diff options
| author | Nans Lefebvre <len@odoo.com> | 2019-09-04 06:46:05 +0000 |
|---|---|---|
| committer | Nans Lefebvre <len@odoo.com> | 2019-09-04 06:46:12 +0000 |
| commit | 19b17365d78febe5fbf5ac8319d19e48703bc369 (patch) | |
| tree | bfc75b9d31c01c0edf7875727ea316d1b29e6e40 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 638eac9baea60ee9126043ee0088232a5dee3668 (diff) | |
[FIX] stock_landed_costs: do not (incorrectly) use float_compare to mean float_is_zero
Take a landed cost with an amount_total of 2464788.5
in a currency with no decimals, so precision_digits is 0.
Now let the sum of the lines 2464788.499999999.
Additionally, we have that 2464788.5 is rounded up to
2464789 and 2464788.499999999 is rounded down to 2464788.
So float_compare returns a nonzero value.
However, it turns out that the docstring of float_compare contains:
Warning: ``float_is_zero(value1-value2)`` is not equivalent to
``float_compare(value1,value2) == 0``
So the intended use was to use float_is_zero.
opw-2048388
closes odoo/odoo#36208
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
