Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

7

Is it possible to open PDFs directly in the browser?

By
Jason Cash
on 3/29/13, 2:43 PM 7,255 views

For example, when I click print on a sales quotation it downloads the pdf as a file. I would like it to open the PDF in a new tab in the web browser using a PDF web viewer plugin. This is the same action that happens when you click on a hyperlink in a webpage that points directly to a PDF file.

The reason for this is that I need to save the PDFs in a certain location with a certain name. Right now I have 50 Quotation_Order PDFs in my downloads folder.

4
haylahi
On 3/29/13, 5:17 PM

hello, you can do it with this module,

[Openerp Web PDF Report Preview & Print] https://github.com/buke/openerp-web-pdf-preview-print.git

Does it work in ubuntu or it works in windows only?

Sudhir Arya (SA)
on 5/2/13, 2:33 AM

This doesn't work with chrome in ubuntu..It throws an error get_title not defined..

Shelton
on 5/2/13, 4:43 AM
1
Tim
On 3/29/13, 3:11 PM

I beleive this is possible with correct browser/pdf plugin settings and it has nothing to do with OpenERP

can you show us which browser and how, (I could not managed to do that)

Altınkaya Elektronik Cihaz Kutuları imalat Ticaret ltd sti, Ahmet Altinisik
on 4/25/13, 8:48 PM
1
NIcolas Plée
On 5/1/13, 12:27 PM

I tried it with Google Chrome that natively deal with it and even try adding a dedicated module with no psitive result. It keeps asking to download the .pdf file. Why preview isn't natively included in OpenERP ? It seems to be a basical user need.

1

patrick

--patrick--
1958
| 5 4 7
Baarn, Netherlands
--patrick--
patrick
On 5/2/13, 8:35 PM

Another thought: give some naming to the PDF-files you want to save, so you can see the difference between them.

Settings -> Actions -> Reports

Click on report you want to change the default name of

in the field behind 'Save as Attachment Prefix' you can specify the name. You can use python code to specify the name. My situation:

((object.name or '!NoName')+('_')+time.strftime('%Y-%m-%d-%H-%M').replace('-','')+'.pdf')

This will use the name of the object, an _ and than the year (not century), month, day, hour and minute of the moment you pressed the print button for this object.

This will not work with jasper reports, only rml reports..

Shelton
on 5/3/13, 3:29 AM
0
NIcolas Plée
On 5/1/13, 1:19 PM

I tried it with Google Chrome on MacOS that natively deals with it and even try adding a dedicated module with no positive result. It keeps asking to download the .pdf file.

But Haylahi's option worked like a charm and I can now preview Openerp pdfs in my browser.

Why PDF and other file preview isn't natively included in OpenERP ? It seems to be a basical user need.

0
john
On 4/17/13, 10:40 AM

Firefox browser can preview the pdf with option to print or save

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 3/29/13, 2:43 PM
Seen: 7255 times
Last updated: 3/29/15, 10:53 AM