Skip to content

Commit

Permalink
[FIX] product: price list reports with too many fractional digits
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jpp-odoo committed Sep 12, 2019
1 parent d93e5c1 commit 6403767
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addons/product/report/product_pricelist_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 6403767

Please sign in to comment.