Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3197 Переглядів

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 


Аватар
Відмінити
Найкраща відповідь

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.


Аватар
Відмінити
Автор

I have correct version

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

Автор

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 Відповіді Переглядів Дія
2
січ. 24
5597
1
серп. 23
2695
1
квіт. 23
1992
3
серп. 24
3133
1
черв. 24
1488