diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2020-04-10 14:10:27 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2020-04-14 15:54:17 +0000 |
| commit | 15b5b5f518e1a5654d7bc3c2b4b1d7311254b878 (patch) | |
| tree | f726632073b21fe5d1890f53a50f56ec6f648691 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | e3a171e34f6d9fe4ef6f42c124262c38ae321f9d (diff) | |
[FIX] mrp: decoration precision
1. Set Decimal Accuracy of "Product Unit of Measure" to 6
2. Create new Unit of measure: "Thousand(s) of units", with ratio 1000.0
3. Set accuracy for Unit(s), Thousand(s) of units, kg to 0.000001
4. Create two products: "parent" (UoM: Thousand(s)) and "child" (UoM: kg)
5. Create Bill of material: parent needs 0.12 of child
6. Add 10000 of child product to stock
7. Create manufacturing order for 100.123456 of parent product.
8. Click "Produce".
The decoration of the lines is incorrect.
This happens because of Float representation at the JavaScript level,
leading to comparison such as:
`12.014999...8 < 12.015000`
It's not possible to use some kind of rounded comparison. As a
workaround, we change the way the float are compared.
opw-2234824
closes odoo/odoo#49559
X-original-commit: f62c2b33fe834defb2c39988f3c9e90047a56d2c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
