Hi,
How i can print invoice with limited number of rows per page
for exemple , i have a invoice order with 50 lines i want to print 20 lines per page
mean my printed pdf document will be in 3 pages in this case
Thank you
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
How i can print invoice with limited number of rows per page
for exemple , i have a invoice order with 50 lines i want to print 20 lines per page
mean my printed pdf document will be in 3 pages in this case
Thank you
You could do it like this :(always is better if you post your code so we don't need to create an example)
<div t-if="line_index % 20 == 0" style="page-break-after: always;">
<br/>
</div>
Just include that code in your report inside the foreach of the lines, set the var name of the foreach loop instead of the bold line in the above
t-if="line_index % 20 == 0"
That will cause to insert a page break every 20 lines
this is my code
<table width="100%">
<tr t-foreach="o.invoice_line" t-as="l" class="tr" height="30" >
<td width="13%"><span t-field="l.product_id.default_code"/></td>
<td width="39%" class="text-left"><span t-field="l.product_id.name"/></td>
<td width="14%" class="text-left"><span t-field="l.name"/></td>
<td width="7%" class="text-left"><span t-field="l.quantity" t-field-options="{"widget": "integer","digits":0}"/></td>
<td width="8%" class="text-left"><span t-field="l.uos_id"/></td>
<td width="8%" class="text-left"><span t-field="l.price_unit"/></td>
<td width="9%" class="text-right">
<span t-field="l.price_subtotal"/>
</td>
</tr>
</table>
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
0
ene 24
|
1528 | ||
|
1
dic 23
|
1727 | ||
|
2
dic 24
|
7326 | ||
Error when send & print
Resuelto
|
|
3
oct 22
|
5878 | |
Show product categories on invoice
Resuelto
|
|
1
ene 21
|
5320 |