This question has been flagged
2 Replies
2653 Views

The default reports from Odoo, if you have a long PO or SO, the headers of the table with the orderlines in a PO are repeated on every new page.

While for a SO, the headers are not repeated.


It is a bit strange that the behavior is different.


Where exactly this function of repeating the header of the table is in the report xml ?

Avatar
Discard
Author Best Answer

Quite often you find the answer just when you posted it ...

https://github.com/odoo/odoo/blob/6dd19cdd8ccd98ebb5985ac2507fbbfa529a68d5/addons/sale/report/sale_report_templates.xml#L68-L69

Avatar
Discard

Many thanks, I was just loking for this!

Best Answer

I faced this issue in Odoo 15 and I found solution for it by doing the following:

1- Use the basic_layout (recommended) or you can use html_container instead of external_layout


2- Then add div with class="page" and add in this div everything you want to repeat, something like the below:

               

                   

                       

                           

                               

                               

                               

                           

                       

                       

                           

                               

                               

                               

                            

                       

                   

Column header 1Column header 2Column header 3

               


















Column header 1 Column header 2 Column header 3


After you restart your server and upgrade your module, when you print the report the header should be displayed repeatedly on each page.

I hop this helps you, thanks 

Avatar
Discard