[FIX] sale: do not display negative discount
opw-1903225 closes odoo/odoo#29829
This commit is contained in:
@@ -460,6 +460,7 @@
|
||||
</td>
|
||||
<td t-attf-class="text-right {{ 'd-none d-sm-table-cell' if report_type == 'html' else '' }}">
|
||||
<div
|
||||
t-if="line.discount >= 0"
|
||||
t-field="line.price_unit"
|
||||
t-options='{"widget": "monetary", "display_currency": sale_order.pricelist_id.currency_id}'
|
||||
t-att-style="line.discount and 'text-decoration: line-through' or None"
|
||||
@@ -470,7 +471,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td t-if="display_discount" t-attf-class="text-right {{ 'd-none d-sm-table-cell' if report_type == 'html' else '' }}">
|
||||
<strong t-if="line.discount" class="text-info">
|
||||
<strong t-if="line.discount > 0" class="text-info">
|
||||
<t t-esc="((line.discount % 1) and '%s' or '%d') % line.discount"/>% discount
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user