Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
1327 Visualizzazioni

I am using Online 17.  I created a custom PO report that was working fine until recently.  For some reason the header with the logo, etc is no longer printing.  I've noticed that it is also not printing on the default PO report within Odoo.  I suspect there is a problem with the template, but unsure how to verify.

Avatar
Abbandona
Risposta migliore
Check if your report's QWeb template references the external_layout_header. This is often done like this:
<t t-call="web.external_layout">
    <div class="page">
    </div>
</t>


Avatar
Abbandona
Risposta migliore

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 may 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
Abbandona
Risposta migliore

Hello  Christopher,

You can temporarily switch from PDF to HTML generation to verify if the header is displaying correctly. Another troubleshooting method is to open the generated PDF using a PDF editor (such as the free PDFGear) to determine whether the logo is extending beyond the page boundaries or if it's not being generated at all. 
Hope these can help you.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
lug 25
1355
3
ago 25
281
3
ago 25
1609
3
ago 25
525
1
lug 25
447