[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
This commit is contained in:
Nicolas Martinelli
2016-08-30 09:53:10 +02:00
parent a437811146
commit 5100aa8113
+1 -1
View File
@@ -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",