From 2a3722d52d1059d9b747077f9660ecd932579de2 Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Wed, 10 Feb 2021 18:34:25 +0000 Subject: [FIX] web: fix float value representation in export - Create a product with: Cost: 60.80 Quantity On Hand: 999.0 - Go to Inventory / Reporting / Inventory Valuation - Click on export all (little button next to "Inventory at date") The field "Total value" have too many decimals: 60739.2000000004 This occur because of the multiplication: it yield the correct value (60739.2), but every rounding attempt done, even in the ORM, will mess up the representation https://github.com/odoo/odoo/blob/042298f8c949fba470eda6ad90f94c95ca291030/odoo/fields.py#L1333 opw-2438384 closes odoo/odoo#67543 X-original-commit: 67cf82962688360cfe25c6b2118a7dbd17a6ee95 Signed-off-by: agr-odoo --- addons/web/static/src/js/widgets/data_export.js | 1 + 1 file changed, 1 insertion(+) (limited to 'addons/web/static/src/js/widgets/data_export.js') diff --git a/addons/web/static/src/js/widgets/data_export.js b/addons/web/static/src/js/widgets/data_export.js index ec21e196771..f6354920c74 100644 --- a/addons/web/static/src/js/widgets/data_export.js +++ b/addons/web/static/src/js/widgets/data_export.js @@ -119,6 +119,7 @@ var DataExport = Dialog.extend({ name: field, label: this.record.fields[field].string, store: this.record.fields[field].store, + type: this.record.fields[field].type, })); this._exportData(exportedFields, 'xlsx', false); }, -- cgit v1.2.3