Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
6083 Näkymät

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
Hylkää
Tekijä Paras vastaus

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
Hylkää

Many thanks, I was just loking for this!

Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
elok. 25
3134
1
huhtik. 25
4527
1
huhtik. 24
1921
0
huhtik. 24
1892
1
helmik. 24
5258