Hi everyone, I tried using a page break in odoo QWEB but the whole table gets printed in the next page. How can i get the 2 first rows in a page and the remaining in the next . Thanks in advance
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
Hi Houssem Salem,
Please find code in comment.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
You can try to apply css like,
tbody .tr:nth-child(2) {
page-break-after: always;
}
or
tbody tr{
page-break-inside: avoid;
page-break-after: auto;
}
This is my code i can't figure it out
<tbody>
<t t-set="i" t-value="1"/>
<t t-set="counter" t-value="0"/>
<t t-foreach="o.line_ids" t-as="line">
<tr class="text-center">
<td>
<span t-esc="i"/>
<t t-set="i" t-value="i+1"/>
</td>
<td>
<span t-field="line.matricule_cnss"/>
</td>
<td>
<span t-field="line.employee_name"/>
</td>
<td>
<span t-field="line.num_chezemployeur"/>
</td>
<td>
</td>
<td>
<span t-field="line.premier_mois"/>
</td>
<td>
<span t-field="line.deuxieme_mois"/>
</td>
<td>
<span t-field="line.troisieme_mois"/>
</td>
<td>
<span t-field="line.tot_gen"/>
</td>
<t t-if="counter == 2">
<p style="page-break-before;"> </p>
<t t-set="counter" t-value="0"/>
</t>
<t t-set="counter" t-value="counter + 1" />
</tr>
</t>
</tbody>
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
|
1
Juni 22
|
2692 | ||
|
1
Apr. 25
|
3008 | ||
|
0
Mai 22
|
2798 | ||
|
0
Mai 22
|
3377 | ||
|
1
Apr. 25
|
410 |