[FIX] sale: price_unit in portal decimal precision

Before this commit, the unit price in the so's portal, had the same
decimal precision as the currency and not the one specified for the unit
prices.

Now, the portal shows the unit prices with their specific decimal
precision.

related to : a1e6a0f0c5

opw-2042089

closes odoo/odoo#35171

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
This commit is contained in:
Jorge Pinna Puissant
2019-07-25 09:19:14 +00:00
parent c7beb9994f
commit 44e8fd3b18
+1 -2
View File
@@ -468,12 +468,11 @@
<div
t-if="line.discount &gt;= 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"
t-att-class="(line.discount and 'text-danger' or '') + ' text-right'"
/>
<div t-if="line.discount">
<t t-esc="(1-line.discount / 100.0) * line.price_unit" t-options='{"widget": "monetary", "display_currency": sale_order.pricelist_id.currency_id}'/>
<t t-esc="(1-line.discount / 100.0) * line.price_unit" t-options='{"widget": "float", "decimal_precision": "Product Price"}'/>
</div>
</td>
<td t-if="display_discount" t-attf-class="text-right {{ 'd-none d-sm-table-cell' if report_type == 'html' else '' }}">