Skip to content

Commit

Permalink
Merge PR #1710 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed May 15, 2024
2 parents 30fba3e + 8995a08 commit 4fca7c7
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions account_invoice_fixed_discount/reports/report_account_invoice.xml
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
<!-- Copyright 2017 ForgeFlow S.L.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<template
id="report_invoice_document"
inherit_id="account.report_invoice_document"
priority="101"
>
<template id="report_invoice_document" inherit_id="account.report_invoice_document">
<xpath expr="//t[@t-set='display_discount']" position="after">
<t
t-set="display_discount_fixed"
t-value="any([l.discount_fixed for l in o.invoice_line_ids])"
/>
</xpath>
<xpath expr="//th[@name='th_discount']/span" position="replace">
<xpath expr="//th[@name='th_discount']/span" position="attributes">
<attribute name="t-if">not display_discount_fixed</attribute>
</xpath>

<xpath expr="//th[@t-if='display_discount']/span" position="before">
<t t-if="display_discount_fixed">
<span>Discount Amount (%)</span>
</t>
<t t-else="">
<span>Disc. %</span>
</t>
</xpath>
<span t-field="line.discount" position="replace">

<span t-field="line.discount" position="before">
<t t-if="display_discount_fixed">
<span class="text-nowrap" t-field="line.discount_fixed" /> (or <span
<span class="text-nowrap" t-field="line.discount_fixed" /><span
class="text-nowrap"
t-field="line.discount"
/> %)
</t>
<t t-else="">
<span class="text-nowrap" t-field="line.discount" />
> (or</span>
</t>
</span>
<span t-field="line.discount" position="after">
<t t-if="display_discount_fixed"><span class="text-nowrap"> %)</span></t>
</span>
</template>
</odoo>

0 comments on commit 4fca7c7

Please sign in to comment.