I have header and footer
I extend this header and this footer from "web_external_layout_standard"
Then, I created custom report template
There may be too many products to be created. That's wayI need to divide the data in the table into pages
Also , the error is the like in the picture:
https://i.hizliresim.com/8YZDMk.png
<table class="table">
<tbody>
<t t-set="subtotal" t-value="0"/>
<t t-set="counter" t-value="0" />
<t t-foreach="o.invoice_line_ids" t-as="line">
<tr>
<td style="text-align:center;border:none;width:10%"><span t-esc="line_index + 1"/></td>
<td style="text-align:left;font-size:13px;width:50%;border:none;"><span t-field="line.name"/></td>
<td style="text-align:center;width:10%;border:none">
<span>
<t t-esc="'%.0f'%(line.quantity)"/>
</span>
</td>
<td class="col-xs-1" style="text-align:center;border:none;width:10%"><span t-field="line.price_unit"/></td>
<td class="col-xs-1" style="text-align:center;border:none;width:10%">
<span t-field="line.price_subtotal"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
<t t-set="subtotal" t-value="subtotal + line.price_subtotal"/>
<t t-set="counter" t-value="counter + 1" />
</tr>
<t t-if="counter == 16 and line['price_subtotal']">
<tr class="text-right" style="border:0;border-top:0;">
<td colspan="6">
<strong>Ara Toplam:</strong>
<span>
<t t-esc="subtotal" t-options="{'widget':'monetary', 'display_currency':o.currency_id}"/>
</span>
</td>
</tr>
<t t-set="counter" t-value="0" />
<div style="page-break-after:auto;"></div>
</t>
<t t-if="line_index == (len(o.invoice_line_ids)-1)">
<tr class="text-right" style="border:0;border-top:0;">
<td colspan="6">
<strong>Toplam:</strong>
<t t-set="total" t-value="o.amount_total" />
<span>
<t t-esc="total" t-options="{'widget':'monetary', 'display_currency':o.currency_id}"/>
</span>
</td>
</tr>
</t>
</t>
</tbody>
</table>
use <br/> or an empty <tr>
Hi Mr.Hilar,
Where will I use <br/> and empty <tr>?
Hi Mr.Hilar,
Where will I use <br/> and empty <tr>?