2
votes

I'm creating a report in odoo 11 where i want to print repeatable headers and footers. Below is my code to do the same.

Header Code

 <div class="header">
       <img  height="160" src='/module_name/static/src/img/'/>
 </div>

Footer Code

<div class="footer">
       <img  height="160" src='/module_name/static/src/img/'/>
 </div

And i'm using wkhtmltopdf version - 0.12.4. In this version the custom footer is working properly but the header isn't working.

Further Research

  • When trying with wkhtmltopdf version - 0.12.1 - In this version the default header was displaying despite overriding the header with custom header
  • When trying with wkhtmltopdf version - 0.12.2.2 - In this version no header and footer was displayed (not even the default)
  • When trying with wkhtmltopdf version - 0.12.2.4 - In this version no header and footer was displayed (not even the default)

Any help is much appreciated to bring both custom header and footer. Thanks in advance.

1
create template for your header and footer and call it using t-call in your report.Alpesh Valaki
Welcome in the report hell of Odoo :-( so far 0.12.1 has worked very well. Could you please share more code of your report xml?CZoellner
I'm using version 0.12.2.1 (with patched qt) for creating reports recommended in some posts. Otherwise, a little more code would be very useful indeed.spilymp
Huge thanks for who are all have given a reply to my post . It works properly when i'm installing wkhtmltopdf v-0.12.1 and v -0.12.3.sibi

1 Answers

0
votes
<div class="header">
</div>

please comment the above code technical -> views -> internal_layout

after call to internal_layout like this 

<t t-call="web.internal_layout">
                <t t-foreach="docs" t-as="o">
                    <div class="page" style="font-family: 'helvetica'; font-size: 8pt;">
                        <div class="header">