Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
8501 Vues

I want to limit the number of line items in a table for just 5 items. If the index of the line item reaches 5, the remaining data should print out the next page. Here is what I have so far.

<t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line_ids])"/>

             <table class="table" style="margin-top:84px !important">

                 <tbody class="invoice_tbody">

                    <tr t-foreach="o.invoice_line_ids" t-as="l">

                             

                         <td class="text-left">

                             <span t-field="l.quantity"/>

                             <span t-field="l.uom_id" groups="product.group_uom"/>

                         </td>

                         <td><span t-field="l.name"/></td>

                         <td></td>

                         <td class="text-right">

                             <span t-field="l.price_unit" style="pl8" />

                             <span t-field="l.price_subtotal" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: o.currency_id}"/>

                         </td>

                         <t t-if="l_index == 4">

                            <td style="page-break-inside:always;"> </td>

                        </t>

                      </tr>

                 </tbody>

             </table>

Avatar
Ignorer

These tips help you to get the basic idea about customization in odoo

https://learnopenerp.tumblr.com/

Meilleure réponse

Hi,

Use Below code for Page Break

<p style="page-break-after:always;"/>

Thanks
Avatar
Ignorer
Publications associées Réponses Vues Activité
1
avr. 22
9401
3
nov. 22
8371
0
nov. 18
5012
1
oct. 24
11452
1
juin 17
11840