summaryrefslogtreecommitdiff
path: root/doc/reference/javascript_reference.rst
diff options
context:
space:
mode:
authorNans Lefebvre <len@odoo.com>2019-09-04 06:46:05 +0000
committerNans Lefebvre <len@odoo.com>2019-09-04 06:46:12 +0000
commit19b17365d78febe5fbf5ac8319d19e48703bc369 (patch)
treebfc75b9d31c01c0edf7875727ea316d1b29e6e40 /doc/reference/javascript_reference.rst
parent638eac9baea60ee9126043ee0088232a5dee3668 (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 'doc/reference/javascript_reference.rst')
0 files changed, 0 insertions, 0 deletions