Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
3956 Tampilan

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
Buang

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

Jawaban Terbai

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
Buang
Penulis

Thanks!

Jawaban Terbai

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
Buang
Penulis

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.

Post Terkait Replies Tampilan Aktivitas
2
Sep 24
1867
5
Agu 19
46482
4
Jun 18
20032
0
Jun 18
3254
2
Mei 16
16886