Odoo Help

0

1
1 Answer
0
Justin Chen
13/07/18 06:35

Not sure which version you are using, but in Odoo 11

The report action is defined in file 'stock/report/stock_report_views.xml', which calls template 'report_picking' in file 'stock/report/report_stockpicking_operations.xml'

The header is pulled by line 8, <t t-call="web.external_layout">

So to add content on every page, you can make new external_layout in your own module, and define headers/footers there, just like the original code.
Remember to either override existing action with proper attributes such as naming and paperformat if needed.  Also, override the template 'report_picking' with <t t-call="mymodule.external_layout">

The original external_layout code is located at 'web/views/report_templates.xml', you can use that as a reference to make your own layout or just override external_layout but by doing so, all other reports will be changed as well.  Basically, in Odoo setting there's a style you can choose, external_layout by default reads which style and pass it to another template of style.  The headers/footers are different in each style.

FYI, there's also a great addon by OCA called 'Report Qweb Element Page Visibility' , this addon adds javascript for new classes such as last-page or not-first-page, for your header/footer needs.  For Odoo 11, you need to rename 'report' to 'web' for all the references in the code, since Odoo 11 change naming from Odoo 10.  It supports down to v8 as well.


Ask a Question
Keep Informed
1 follower(s)
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.

Register
Odoo Training Center

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

Test it now