[FIX] product: price list reports with too many fractional digits
Before this commit, when printing the Price List report of a Product Variant, the price is printed directly from the float result of the calculation of the price, even if this price is rounded, the representation of the float can have, sometimes, float precision errors (a lot of 0 after the decimal point, and a 1 or 2 at the end). Now, the function returns a string formatted to the correct number of fractional digits. opw-2069305 closes odoo/odoo#36705 closes odoo/odoo#36770 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com> Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
committed by
Nicolas Martinelli
parent
c24a132ee1
commit
4b750f3a3c
@@ -53,9 +53,9 @@
|
||||
</td>
|
||||
<t t-foreach="data['quantities']" t-as="quantity">
|
||||
<td><strong t-esc="categ_data['prices'][product.id][quantity]"
|
||||
t-esc-options="{
|
||||
'widget': 'monetary',
|
||||
'display_currency': data['pricelist'].currency_id}"/>
|
||||
t-options="{
|
||||
'widget': 'float',
|
||||
'decimal_precision': 'Product Price'}"/>
|
||||
</td>
|
||||
</t>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user