Skip to content
Snippets Groups Projects
Commit 5100aa81 authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] website_sale: strikethrough price

It might happen that a price is strike through in the shopping cart
although it has the same value than the discounted price. This can be
due to differences in decimals smaller than 0.01.

The fix is to apply the same logic than in other places: strike through
if the difference is larger than 0.1.

opw-685109
parent a4378111
No related branches found
No related tags found
No related merge requests found
......@@ -775,7 +775,7 @@
</div>
</td>
<td class="text-center" id="td-price" name="price">
<del t-attf-class="text-danger #{'' if line.product_id.lst_price &gt; line.discounted_price else 'hidden'}" style="text-decoration: line-through; white-space: nowrap;"
<del t-attf-class="text-danger #{'' if line.product_id.lst_price - line.discounted_price &gt; 0.1 else 'hidden'}" style="text-decoration: line-through; white-space: nowrap;"
t-field="line.product_id.lst_price" t-field-options='{
"widget": "monetary",
"from_currency": "line.company_id.currency_id",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment