Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
8569 Visualizzazioni

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
Abbandona

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

https://learnopenerp.tumblr.com/

Risposta migliore

Hi,

Use Below code for Page Break

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

Thanks
Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
apr 22
9461
3
nov 22
8412
0
nov 18
5071
1
ott 24
11512
1
giu 17
11899