Как сделать разрыв страницы в XML?(Оду 10) - PullRequest
1 голос
/ 17 июня 2019

Я хочу напечатать заказ на продажу, под таблицей строки заказа у меня есть подпись для моей компании, поэтому, если строка заказа достигает 10 строк (максимум), я хочу, чтобы она автоматически разбивалась на другой абзац.

это мой код, я делаю счетчик на разрыв, но он кажется неправильным, потому что все таблицы разбиваются на другой абзац

<t t-set="count" t-value="0"/>
    <t t-foreach="layout_category['lines']" t-as="l">
        <t t-set="count" t-value="count + 1"/>  
            <tr>
                <td>
                    <span t-field="l.name"/>
                </td>
                <td class="text-right">
                    <span t-field="l.product_uom_qty"/>
                    <span t-field="l.product_uom" groups="product.group_uom"/>
                </td>
                <td class="text-right">
                    <span t-field="l.price_unit"/>
                </td>
                <td t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">
                    <span t-field="l.discount"/>
                </td>
                <td class="text-right">
                    <span t-esc="', '.join(map(lambda x: (x.description or x.name), l.tax_id))"/>
                </td>
                <td class="text-right" groups="sale.group_show_price_subtotal">
                    <span t-field="l.price_subtotal" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: doc.pricelist_id.currency_id}"/>
                </td>
                <td class="text-right" groups="sale.group_show_price_total">
                    <span t-field="l.price_total" t-options="{&quot;widget&quot;: &quot;monetary&quot;, &quot;display_currency&quot;: doc.pricelist_id.currency_id}"/>
                </td>
            </tr>
        </t>
        <t t-if="count > 3"> 
            <p style="page-break-after:always"></p> 
        </t>

Я думаю, что функция разрыва страницы неправильна?(Возможно)

...