İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
3949 Görünümler

Hello, I have a report of accounting entries, this report has a div that the structure is like this:


(It is the basic structure.)
I have this div near the footer, when there is only one sheet of the accounting entries report, everything is fine with that div, but when there are more than 2 sheets, that div remains static on the first page and does not go to the second ...

What can I do so that this div, despite the fact that there are 10 sheets, always goes to the end of the sheet and does not remain static on the first one?

Odoo 14, thanks!

Avatar
Vazgeç

Hi sir,
Did you get the problem where this absolute div get overlap the content?

En İyi Yanıt

Hi,

You can use this oca module: https://apps.odoo.com/apps/modules/16.0/report_qweb_element_page_visibility/ which help you to achieve this.

This module allows you to use 4 classes in QWEB reports:

  • not-first-page: shows element in every page but first
  • not-last-page: shows element in every page but last
  • first-page: shows element only on first page
  • last-page: shows element only on last page


Thanks

Avatar
Vazgeç
Üretici

Thanks!

En İyi Yanıt

try this way:
modify the CSS positioning of the div element and its parent elements. Instead of using absolute positioning, you can use relative positioning to allow the div to flow with the content on each sheet.
div style="position: relative;">

  1. Apply Changes and Test: Save the modified QWeb template file and restart the Odoo server. Generate the accounting entries report again with multiple sheets, and verify that the div now appears at the end of each sheet instead of remaining static on the first page.

By adjusting the CSS positioning of the div element and using relative positioning, you allow the div to move with the content on each sheet of the accounting entries report. This ensures that the div appears at the end of each sheet, regardless of the number of sheets generated.

Avatar
Vazgeç
Üretici

I think I did not understand
If I have 10 sheets, I want that div to only appear on the tenth sheet and at the end of that same sheet, I don't want it to appear on all of them.
And when it's just a sheet, that div acts normally, that is, it appears at the end of the sheet.
If there are two sheets, that div appears only on the second sheet and at the end of it.
And so on.

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Eyl 24
1862
5
Ağu 19
46480
4
Haz 18
20029
0
Haz 18
3254
2
May 16
16881