hi, I would like to know how to set maximum displayed rows table in qweb report. for example i need 5 rows in the first page and the other rows the second page.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
Hi Yasmina,
You could work with a variable which you use as a counter in the for loop. Every time the counter is dividible by a number (for example 5) you can add a page break to display the next records on the following page. Something along the lines of:
<tr t-foreach="o.your_lines" t-as="line"> <td> <span t-esc="line.name"/> </td> <t t-set="i" t-value="i+1"/> <!-- This will only be on every fifth row. Page break after --> <t t-if="i % 5 == 0"> <div style="page-break-before:always;"></div> </t> </tr>
Regards,
Yenthe
thank you , but whene i used this solution it break and all the table is in the second page. and me i want to get 5 rows in the first page ...
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
4
Mei 23
|
10350 | ||
|
0
Okt 17
|
3347 | ||
|
0
Nov 16
|
2622 | ||
|
0
Okt 16
|
4894 | ||
|
0
Agu 16
|
3046 |