summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorAndrea Grazioso (agr-odoo) <agr@odoo.com>2021-02-10 18:34:25 +0000
committerAndrea Grazioso (agr-odoo) <agr@odoo.com>2021-03-09 15:12:15 +0000
commit2a3722d52d1059d9b747077f9660ecd932579de2 (patch)
tree5875108b38bc009221cf2c7c09391bf1d6d4c8be /addons/web/static/src
parent4b2f0ddcbe859ec8453e537aec9d5b0685876eca (diff)
[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 <agr-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/widgets/data_export.js1
1 files changed, 1 insertions, 0 deletions
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);
},