Reputation: 329
I have customized the layout of sales order template ( added footer and header, formatted content etc. ). For this i created a new module and installed it. When i use this module locally (mac os), i am receiving the sales order document as pdf in the way i set it up. When using this module on a server and all changes do not apply at all. I can see that the module is installed, loaded and also if i switch the PDF-Report to HTML i can see that the Layout is set. There are no 404 Errors in Logfile, so i am somehow stuck
As far as i understood the PDF File is a rendered HTML-File, therefore i am obviously missing some information here.
So my question is, where can i check what layout is used to generate the PDF-File?
Thanks for any help on that!
Upvotes: 0
Views: 2797
Reputation: 41
I also faced the same problem, struggled for a long period. After reading @patrick.tresp explanation I understood the reason. For my case, I made made the odoo port (8069) as the default port, which made the base url as the localhost (domain.com) without the port number. However report url is not detecting the port, hence the problem occurs. When I explicitly defined the report url, the problem get sorted. i.e., Goto Settings -> Parameters -> System Parameters
and add:
key: report.url value: http://domain.ext:8069
Upvotes: 0
Reputation: 329
After finally finding something via more searches i found the solition which i want to share:
It is important to understand that if odoo is running public on any other port than 8069 ( portforwarding etc. ) this issue will always occur.
Generating the pdf will try to find needed assets on the public port which will not lead where needed. The Solution is so easy but somehow i wasnt able to find it easily:
All you need to do is to set a proper url for report generation.
Goto -> Settings -> Parameters -> System Parameters
and add:
key: report.url value: http://localhost:8069
localhost is here the correct domain, do not change this, so the machine will call the report url on itself.
Upvotes: 2
Reputation: 666
Can you check your report layout in Settings ->Technical Settings ->Actions->Reports then search for your report and check qweb views
Upvotes: 0