I want to add something to the footer of the report, but it only appears on the last page of the report generation results. I have tried using the OCA module: https://apps.odoo.com/apps/modules/17.0/report_qweb_element_page_visibility, and add CSS to the element. However, it had no effect at all, my element still appeared on every page. Do you have any references on how to use the details of the module or is there another way? Note: my report uses a custom template from external layout
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
2
Replies
734
Views
Hi,
Try the following method for adding the header and footer,
<!--Header-->
<div class="header">
<div class="row">
<span t-esc="o.name"/>
</div>
</div>
<!--Footer-->
<div class="footer o_standard_footer" style="position: relative;margin-top:140px !important;">
<div class="last-page">
<span t-esc="o.number"/>
</div>
</div>
Hope it helps.
You should set 'last-page' as a class, not CSS style, as the module description says:
<t t-if="o._table=='account_invoice'"> <div class="not-first-page"> <span t-esc="o.number"/> </div> </t> <t t-if="o._table=='sale_order'"> <div class="not-last-page"> <span t-esc="o.name"/> </div> </t>
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Jun 24
|
17 | ||
|
1
Apr 25
|
611 | ||
|
2
Mar 25
|
734 | ||
|
4
Nov 24
|
6383 | ||
|
2
Sep 24
|
2301 |