Skip to Content
Menu
This question has been flagged

Hello,

I'm trying to make two quotations/invoices for customer using v16 CE. When I generate first one it has logo, header and footer defined for template. When I generate second one it come out blank. Only logo, no header and footer. 


Other template styles are applied to both of the documents. Only header and footer missing on every second document. 


Logs do not show me any error, pdf is created successfully but missing header and footer text. Invoice lines are normally displayed.

Third document is a lottery, sometimes it comes out sometimes it doesn't. 


Where can I start ?

Thank you,

Carlo 


Avatar
Discard
Best Answer

If some reports print without the header and the footer, check the log (error_level = debug). You will certainly view such messages:

WARNING databasename odoo.addons.base.models.ir_actions_report: wkhtmltopdf: b"The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-odoo16'\n"

If you see such error, it means that you have to patch your wkhtml2pdf

Type this command to get the current version

# wkhtmltopdf --version
wkhtmltopdf 0.12.5

After patching your library, you will get the following response

# wkhtmltopdf --version
wkhtmltopdf 0.12.5 (with patched qt)

This should solve the problem.


Avatar
Discard
Author

I have correct version

carlo@ERP01:~$ wkhtmltopdf --version
wkhtmltopdf 0.12.6.1 (with patched qt)

Author

When I try to download Report Layout Preview (from settings) I also don't get footer every time.

Hi Carlo,

What do you see if you turn the document into an HTML document ?
Is the heder and the footer visible ?

Carlo,
Could you downgrade to wkhtmltopdf 0.12.5 (with patched qt) ?

Related Posts Replies Views Activity
2
Jan 24
4146
1
Aug 23
1950
1
Apr 23
995
3
Aug 24
848
1
Jun 24
453