summaryrefslogtreecommitdiff
path: root/addons/product/report
diff options
context:
space:
mode:
authorJorge Pinna Puissant <jpp@odoo.com>2019-09-11 12:48:58 +0000
committerNicolas Martinelli <nim@odoo.com>2019-09-12 11:15:48 +0000
commit4b750f3a3ce86f9530a0bbd89370dfc25b5f8751 (patch)
tree3c589d3fef0b17a47cb3b7ffc87c2de10a7f2317 /addons/product/report
parentc24a132ee10f534ec5495157cd5ce87842267323 (diff)
[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>
Diffstat (limited to 'addons/product/report')
-rw-r--r--addons/product/report/product_pricelist_templates.xml6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/product/report/product_pricelist_templates.xml b/addons/product/report/product_pricelist_templates.xml
index f5f59aeff23..a0bfe865af3 100644
--- a/addons/product/report/product_pricelist_templates.xml
+++ b/addons/product/report/product_pricelist_templates.xml
@@ -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>