Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
8491 Weergaven

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
Annuleer

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

https://learnopenerp.tumblr.com/

Beste antwoord

Hi,

Use Below code for Page Break

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

Thanks
Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
apr. 22
9392
3
nov. 22
8366
0
nov. 18
4997
1
okt. 24
11432
1
jun. 17
11825