55 lines
2.0 KiB
XML
55 lines
2.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<template id="gn_discount_report_saleorder_document" inherit_id="sale.report_saleorder_document">
|
|
<xpath expr="//tr[@class='border-black o_subtotal']" position="replace">
|
|
<t t-if="doc.amount_discount > 0">
|
|
<tr class="border-black">
|
|
<td><strong>Subtotal</strong></td>
|
|
<td class="text-right">
|
|
<span
|
|
t-att-style="'text-decoration: line-through' or None"
|
|
t-att-class="'text-danger' or ''"
|
|
data-id="total_before_discount"
|
|
t-field="doc.amount_undiscounted"
|
|
t-options='{"widget": "monetary","display_currency": doc.currency_id}'
|
|
/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Discount**</td>
|
|
<td class="text-right">
|
|
<div>
|
|
<span>-</span>
|
|
<span t-if="doc.amount_discount" t-field="doc.amount_discount"/>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Subtotal with discount</strong></td>
|
|
<td class="text-right">
|
|
<div>
|
|
<div t-if="doc.amount_discount" t-field="doc.amount_untaxed">
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
<t-else>
|
|
<tr class="border-black">
|
|
<td><strong>Subtotal</strong></td>
|
|
<td class="text-right">
|
|
<span t-field="doc.amount_untaxed"/>
|
|
</td>
|
|
</tr>
|
|
</t-else>
|
|
</xpath>
|
|
|
|
<xpath expr="//td[@name='td_subtotal']" position="replace">
|
|
<td name="td_subtotal_before_discount" class="text-right">
|
|
<span t-field="line.price_subtotal_before_discount" t-options="{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}"/>
|
|
</td>
|
|
</xpath>
|
|
|
|
|
|
</template>
|
|
</odoo> |