This question has been flagged
4 Replies
14769 Views

Hi,

That's weird. When I want to print a PDF document, it will not display the header and the footer, no matter what type of document (invoice, etc.)it is. I can see them only when I do preview in Invoice module but when I click "Print", it doesn't display the header and footer anymore. I have no custom modules, my VM is just created, I'm on Odoo13 but it didn't work on Odoo12 too, it works on Odoo from odoo.com but not on local Odoo, I try to add some text in header or footer from editing settings but it is not displayed. I tried everything I could. Please help me.


Thanks a lot.


PS: I can't upload images so sorry, Odoo forum be like...

Avatar
Discard

Sehr geehrte Damen und Herren,

ich bin nicht mehr bei der Datenpol tätig. Da diese E-Mail nicht weitergeleitet wird, bitte ich Sie auch eine meiner Kolleginnen bzw. einen meiner Kollegen zuzugehen oder wenden Sie sich bitte an support@datenpol.at

Danke & LG,
Aly
Best Answer

Hi,

Make sure that the Wkhtmltopdf is correctly installed in the system.

Thanks

Avatar
Discard
Author

Yes it is and I uninstalled it then reinstalled but that seems to be the same issue. I have the body of document (order line, prices, total, etc.) but not the header and footer.

Make sure correct version installed. Try to install stable wkhtmltopdf version.

Author

I was in Wkhtmltopdf 0.12.4 and I just upgrade it to 0.12.5 which is the recommanded version of it, according to official Odoo 13 install. That's weird because the logo in the header appears and company informations too BUT not the footer. And I went to settings and go back and company informations disappears. I'm lost..... Thanks for your help !

Author

That's ok you solved my problem! Thanks for all!

So how did you resolve this issue. I have the same problem with the footer and some content in the header is randomly disappearing and appearing.

Author

Hi, you can download wkhtmltopdf 0.12.5 on this website: https://wkhtmltopdf.org/downloads.html. Choose your Ubuntu version (for me that was Ubuntu 16.04 (xenial)). Uninstall previous version and install the new. For example, on my version of Ubuntu I did just sudo gdebi name_of_module and it works. Hope this help.

I am already running wkhtmltopdf 0.12.5 with ubuntu 18.04 for Odoo13.

I think i have a different problem

Author

Oh no I had the same issue with Odoo 13 and I didn't fix it I think that's because of ubuntu 18.04. So I downgrade to Ubuntu 16.04 and Odoo12 (I think Odoo13 is instable to). You know ?

I found the issue. Apparently i was using an incompatible database, which i created before there was an official odoo 13.0 branch.

You see it, when you go to the database manager and there is a yellow warning sign and there is also a message in the logs.

I solved the issue by creating a new database, which isn't a problem since i am still developing.

Sorry for the inconvenience and thanks for the help ;)

Author

Ok maybe I had the same issue. Thanks!

Best Answer

Hi all,

I've got the same problem with my Odoo 17 on my Ubuntu server 23.04 but with a small difference I think...
After editing the quotation template for instance juste by adding header (or footer), I save the changes, I ask to see how it goes, it displays the webpage and on the left hand side, there is a button to show details.

When I click on this button, a PDF file is displayed and the header (or the footer) are also displayed in the file, but on a different page.

I hope this will help developper to find/solve the problem... it's pretty annoying !

Regards

Avatar
Discard
Best Answer

I had similar issues in the past where everything (i.e., wkhtmltopdf) was installed correctly. I was able to solve it by deactivating developer mode activated with assets. If you have developer mode activated with assets, you should try deactivating this, because it affects the rendering process. See: https://www.odoo.com/forum/help-1/report-pdf-print-missing-footer-216688

I hope this helps!


Avatar
Discard
Best Answer

I can't get headers & footers to display running Odoo v17.
All headers are forwarded.


wkhtmltopdf --version

wkhtmltopdf 0.12.5 (with patched qt)


tried v 0.12.6 first which didn't work then downgraded to the above which apparently should work but still does not!


Any ideas as this is a real pain. Does this happen still in the enterprise version? It's things like this that are stopping pushing the button on enterprise. I need self hosted so it's going to be a big upfront cost and if basic things like this don't work then it'll be a waste of money and time.


Can anyone help? Server is running Ubuntu 22.04, Odoo v17 from source. 


Avatar
Discard