Odoo Help


Why won't the header appear in a PDF report?

Jeff Beidler
on 1/20/15, 12:56 PM 3,901 views

I have looked through and tried all the suggestions from here and github.  I have checked my wkhtmltopdf version (0.12.1 patched with qt), I have tried changing the web.base.url parameter, adding the freeze parameter, etc.  My headers are still missing from PDF reports.  The system seems to be able to do the rest, as Bootstrap elements appear, as does the footer.  I did see this message show up once:

2015-01-20 17:16:21,146 22730 INFO JB-1-19 werkzeug: - - [20/Jan/2015 17:16:21] "GET /web/binary/image?model=res.partner&field=image_small&id=3&resize= HTTP/1.1" 304 -

Any more things to try?  Would be nice if a fix for this was included in Odoo . . .

open your report from setting=>technical=>actions=>reports in your report click on Other Information tab you need to check "Add RML Header" then the header will appear in PDF report

on 1/21/15, 5:00 AM

Anyone have an answer for Odoo 8?

Jeff Beidler
on 1/22/15, 2:02 PM
Jeff Beidler
On 1/22/15, 5:10 PM

Aha!  I think I have hit on the answer, and the answer is that I'm a doofus!  In my custom XML template, I had selected the code block with:

<xpath expr="//div[@class='header']" position="replace"> . . . </xpath>

In my replacement code, I hadn't replaced the "<div class='header'>" tag.  Apparently, the header won't render in a PDF without that special div class!  Learn from my mistake!  :)


Anil R. Kesariya

--Anil R. Kesariya--
| 7 6 8
Rajkot, India
--Anil R. Kesariya--

Odoo Techno Functional Expert

* Engaged with odoo since May - 2012.

* Customise existing module or develop new module base on customer requirement.

* Played key developer role in many past and running projects.

* Expert in requirement gathering of business and transforming requirement into odoo platform.

* Major expertise in core modules, database, report development and theme development.

* Integration expert.

Linkedin  : https://in.linkedin.com/in/anil-kesariya-97b20a66

Anil R. Kesariya
On 1/23/15, 2:04 AM

Hello Jeff Beidler,

There are two possiblites if your header is not appear in your report in odoo.

1) if wkthmltopdf lib not install in your system. (Install 0.11 or later version of wkhtmltopdf)

2) If you forgot call base template. (report.external_layout) inside your report template than you will not get header and footer in your report. Make sure you have follow this base structure for your report.

    <template id="your_unique_template_id">
            <t t-call="report.html_container">
                <t t-foreach="docs" t-as="var">
                    <t t-call="report.external_layout">  <!-- Make sure you have applied this template to your report. -->
                        <div class="page">

                                        <!-- Your report body-->



Hope this will help.



Harsh Dhaduk
On 1/23/15, 1:48 AM


I had same problem like you and i solved following step.

Settings -> Technical -> Parameters -> System Parameters -> find web.base.url and set value as[OdooPortNo] save and refresh page after try to print.


On 1/21/15, 4:59 AM

open your report   from setting=>technical=>actions=>reports

in your report click on Other Information tab

you need to check "Add RML Header"  then the header will appear in PDF report

Is that a v7 thing? I don't see that tab in v8. Plus, I'm using Qweb, not RML.

Jeff Beidler
on 1/21/15, 11:35 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/20/15, 12:56 PM
Seen: 3901 times
Last updated: 3/16/15, 8:10 AM