summaryrefslogtreecommitdiff
path: root/addons/web/static/tests
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/tests
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/tests')
-rw-r--r--addons/web/static/tests/widgets/data_export_tests.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/web/static/tests/widgets/data_export_tests.js b/addons/web/static/tests/widgets/data_export_tests.js
index 8890ee48c20..7f9a74e9ce4 100644
--- a/addons/web/static/tests/widgets/data_export_tests.js
+++ b/addons/web/static/tests/widgets/data_export_tests.js
@@ -323,9 +323,11 @@ QUnit.module('widgets', {
fields: [{
name: 'foo',
label: 'Foo',
+ type: 'char',
}, {
name: 'bar',
label: 'Bar',
+ type: 'char',
}]
}, "should be called with correct params");
args.complete();
@@ -368,9 +370,11 @@ QUnit.module('widgets', {
fields: [{
name: 'foo',
label: 'Foo',
+ type: 'char',
}, {
name: 'bar',
label: 'Bar',
+ type: 'char',
}]
}, "should be called with correct params");
args.complete();