跳至内容
菜单
此问题已终结
2 回复
5939 查看

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 ?

形象
丢弃
编写者 最佳答案

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

形象
丢弃

Many thanks, I was just loking for this!

最佳答案

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 

形象
丢弃
相关帖文 回复 查看 活动
2
8月 25
2972
1
4月 25
4388
1
4月 24
1778
0
4月 24
1808
1
2月 24
5083