Odoo Help


This community 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.


How to print the doc no. (Purchase Order no. or invoice no.) on each page of PDF report

Tanveer Singh
on 9/18/13, 9:25 AM 1,536 views

Our purchase order spans a number of pages. We have customized the report format using the Openoffice report plugin. However, now we find that the PO no. is printed only on the 1st page (as it is part of the report content and not the header). We need the PO number to appear on all pages.

The header and footer are configured in the Company settings so there seems to be no option there to provide any field for the particular document being printed.

Is there any way to ensure a field in the rml file generated from Openoffice comes on all the pages of the report?

Tanveer Singh
On 1/13/15, 11:15 AM

Am answering my own question. In Odoo 8 I added o.name to the standard report footer.

To do this, go to Settings->User Interface->Views and edit the View with the ID : report.external_layout_footer

Here add something like the following inside the <div class="footer"> tag:

<t t-if="o.name"> <span style="font-size:8pt;" t-field="o.name"/> </t>

Now whatever document (PO, Invoice, etc.) is printed, its 'name' field (normally containing the PO number/ invoice number) gets printed in the footer on all pages. Simple solution.

On 9/18/13, 2:09 PM

I did one changing like this before for our customer, it need do some coding, add doc no variable to RML parser context, then you can change the company's header script to add the doc no variable. If you want the code or need extra help, you can contact me at newmooncn@gmail.com


Andreas Brueckl

--Andreas Brueckl--
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 9/18/13, 10:53 AM

I think that with OpenOffice this is not possible. If you are directly changing the RML-Report you can try the following option:

  • Uncheck the flag Add RML Header for the report in menu Settings/Actions/Reports for the desired report. Then copy the company header into the RML file of the report and add the required field.

The problem here is that you somehow have to put the repeatIn(objects,'o') statement before the header. Do not know whether this is possible.

Thank you Andreas. Let me try to do this. Will report back.

Tanveer Singh
on 9/25/13, 2:20 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


Asked: 9/18/13, 9:25 AM
Seen: 1536 times
Last updated: 3/16/15, 8:10 AM