Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3354 Widoki

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 


Awatar
Odrzuć
Najlepsza odpowiedź

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.


Awatar
Odrzuć
Autor

I have correct version

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

Autor

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) ?

Powiązane posty Odpowiedzi Widoki Czynność
2
sty 24
5796
1
sie 23
2836
1
kwi 23
2119
3
sie 24
3344
1
cze 24
1635