帐户发票报告中的状态
State in account invoice report
我在帐户发票报告中添加了一些字段,我想让这些字段仅在状态 'paid' 和 'open' 中可见。我怎样才能实现它?
<xpath expr="//span[@t-field='o.amount_total']/../.." position="after">
<t t-if="get_report_setting('print_payment_info', o)">
<tr class="border-black">
<td>Paid to date</td>
<td class="text-right">
<span t-esc="o.amount_total-o.residual" t-esc-options='{"widget": "monetary", "display_currency": "o.currency_id",}'/>
</td>
</tr>
<tr>
<td><strong>Balance amount</strong></td>
<td class="text-right">
<span t-field="o.residual" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
</td>
</tr>
</t>
</xpath>
要存档此文件,请使用 t-if
<xpath expr="//span[@t-field='o.amount_total']/../.." position="after">
<t t-if="o.state == 'open' or o.state == 'paid'">
<t t-if="get_report_setting('print_payment_info', o)">
<tr class="border-black">
<td>Paid to date</td>
<td class="text-right">
<span t-esc="o.amount_total-o.residual" t-esc-options='{"widget": "monetary", "display_currency": "o.currency_id",}'/>
</td>
</tr>
<tr>
<td><strong>Balance amount</strong></td>
<td class="text-right">
<span t-field="o.residual" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
</td>
</tr>
</t>
</t>
</xpath>
我在帐户发票报告中添加了一些字段,我想让这些字段仅在状态 'paid' 和 'open' 中可见。我怎样才能实现它?
<xpath expr="//span[@t-field='o.amount_total']/../.." position="after">
<t t-if="get_report_setting('print_payment_info', o)">
<tr class="border-black">
<td>Paid to date</td>
<td class="text-right">
<span t-esc="o.amount_total-o.residual" t-esc-options='{"widget": "monetary", "display_currency": "o.currency_id",}'/>
</td>
</tr>
<tr>
<td><strong>Balance amount</strong></td>
<td class="text-right">
<span t-field="o.residual" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
</td>
</tr>
</t>
</xpath>
要存档此文件,请使用 t-if
<xpath expr="//span[@t-field='o.amount_total']/../.." position="after">
<t t-if="o.state == 'open' or o.state == 'paid'">
<t t-if="get_report_setting('print_payment_info', o)">
<tr class="border-black">
<td>Paid to date</td>
<td class="text-right">
<span t-esc="o.amount_total-o.residual" t-esc-options='{"widget": "monetary", "display_currency": "o.currency_id",}'/>
</td>
</tr>
<tr>
<td><strong>Balance amount</strong></td>
<td class="text-right">
<span t-field="o.residual" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
</td>
</tr>
</t>
</t>
</xpath>