Files
Odoo-18.0-20251222/account_invoice_triple_discount/report/invoice.xml
tocmo0nlord adbe430761
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled
Initial commit: Odoo 18.0-20251222 extra-addons
2026-03-13 20:43:25 +00:00

59 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template
id="report_invoice_document"
inherit_id="account.report_invoice_document"
priority="100"
>
<xpath expr="//t[@t-set='display_discount']" position="attributes">
<attribute name="t-value">False</attribute>
</xpath>
<xpath expr="//t[@t-set='display_discount']" position="after">
<t
t-set="discount_class"
t-value="'text-end %s' % ('d-none d-md-table-cell' if report_type == 'html' else '')"
/>
</xpath>
<xpath expr="//th[@name='th_discount']" position="attributes">
<attribute name="style">visibility: hidden;</attribute>
</xpath>
<xpath expr="//th[@name='th_discount']" position="after">
<th
name="th_discount1"
t-if="display_discount"
t-att-class="discount_class"
>
<span>Disc.1 %</span>
</th>
<th
name="th_discount2"
t-if="display_discount"
t-att-class="discount_class"
>
<span>Disc.2 %</span>
</th>
<th
name="th_discount3"
t-if="display_discount"
t-att-class="discount_class"
>
<span>Disc.3 %</span>
</th>
</xpath>
<xpath expr="//td[span[@t-field='line.discount']]" position="attributes">
<attribute name="style">visibility: hidden;</attribute>
</xpath>
<xpath expr="//td[span[@t-field='line.discount']]" position="after">
<td t-if="display_discount" t-att-class="discount_class">
<span class="text-nowrap" t-field="line.discount1" />
</td>
<td t-if="display_discount" t-att-class="discount_class">
<span class="text-nowrap" t-field="line.discount2" />
</td>
<td t-if="display_discount" t-att-class="discount_class">
<span class="text-nowrap" t-field="line.discount3" />
</td>
</xpath>
</template>
</odoo>