Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
1069 Vistas


While generating the PDF report, the header and footer are not appearing on the server. Although changing the paper format adjusts the space for them, the header and footer still do not display. However, they work correctly in the local environment.

Avatar
Descartar
Mejor respuesta

Being as you have wkhtmltopdf installed and you can see the PDF even though its not displaying properly it requires that the web.base.url has a valid certificate for it to generate the report correctly, if for some reason this is ignored then the Headers and Footers will be deformed. 

To get them to display the way you want, activate developer mode, Technical >> System Parameters search for url, you will see only web.base.url along with your domain name unless you are using localhost:8069 then the pdf would work. But for a FQDN the report will not show the footer as wkhtmltopdf is most probably behind a proxy in which case create a new system parameter called report.url  and set the value to either http://localhost:8069 or the docker container name if using Docker. So it would be http://<container_name>:8069 or which ever port you are using.

There is no requirement to restart Odoo, just take a look at the report and see if the footer shows. 

** You man need to fix the Paper Format margins, Technical >> Reporting >> Paper Format and set up the xlms to your requirements, but I found this to work a treat as it forces wkhtmltopdf to use report url rather than the external facing one.

Hope this helps those who are having this problem. 

Avatar
Descartar
Autor

Thank you for your support

Mejor respuesta

Hi,

if headers and footers aren't showing in PDF reports on your server but work locally, it's likely due to a missing or incorrect version of wkhtmltopdf. Odoo requires version 0.12.6 with Qt patches for proper header/footer rendering. Install the correct version on your server, then restart the Odoo service. 


Hope it helps


Avatar
Descartar
Autor


Thank you for your support

Publicaciones relacionadas Respuestas Vistas Actividad
1
jul 25
130
3
jul 25
2208
1
feb 25
935
1
feb 25
1084
2
ene 25
1094