Skip to Content
Menu
This question has been flagged

When i print a posted invoice report, the header(with company logo and address details) and footer (with some custom information added from code) does not always appear on the pdf report.

I tried adjusting the wkhtmltopdf version , i tried setting up report.url in system parameters. 

Still sometimes the footer gets printed properly as it should properly the report is exactly what i want, but most of the time , the report printed does not have the footer in it. 


https://ibb.co/C87nwxJ
https://ibb.co/64X6xL3

here are the reports that gets printed , the autorized signature and the printed by part on the footer does not always get printed and only the the signature dots gets printed . sometimes its totally fine but sometimes its not.


im sure my code is correct so whats the problem here.


I inherit the report_document and external_layout_bold for the invoice report customization.], and am using the bold layout for the reports.


ive tried wkhtmltopdf 0.1.6 ,0.1,5 and 0.2 versions, installing it in both ubuntu env and python(pip) environment but apt-get and pip install both . 


Avatar
Discard
Author

Yes, i am using the Odoo Enterprise on premise, i also tried on local environment(ubuntu 22.04) ,both leads to the same problem. I havent yet tried it on odoo.sh, i will try it on odoo.sh soon and see what happens 

Personally i havent seen this behaviour on SH. But just go and check it.
I would be interested in your findings!

Author

i tried it on odoo.sh and there it prints fine in both developer mode and normal mode, seems like the issue is on premise and localhosts

Best Answer

Just a quick thought crossing my mind...

I observed this kind of behaviour in the past, when the developer mode is activated. Do you have the same problem when deactivating it?

Avatar
Discard
Author

Thankyou! It is indeed in developer mode that this bug exists. I hadn't noticed that.
When i turn off the developer mode, it prints completely fine.
Any idea what the problem is?

Hey..
this could be a timing issue creating the problem.
What is your hosting type? Are you running Odoo on Premise?

As you already tried to attack this issue with report.url, maybe you should check your web.base.url. A changing parameter can affect this as well if i remember right. You also could give it a try to freeze this parameter by adding web.base.url.freeze parameter.

I general the report.url should is handled prior the the web.base.url.

Related Posts Replies Views Activity
0
Nov 18
3009
3
Mar 15
4879
5
Nov 24
31215
1
Aug 17
3653
2
Mar 15
5636