d17f22cde7
When setting a float field, the web client rounds the value entered by the user using the instance.web.round_decimals method. Nevertheless, this is possible that this method returns unrounded float, due to the float precision For example, round_decimals(53.8, 2) returns 53.800000000000004 In order to compare this new float value to the old float value and check the eventual change), we need to check if the delta between the two is almost 0. This is the goal of the float_is_zero method introduced during this rev. which is comparable to the float_is_zero method already available in the openerp server, in openerp.tools. Float values compared using the simple === operator instead of this float_is_zero method will be regarded as different in some cases, according to the float value and the precision And the value of the field will be regarded as changed, which can lead to unwanted triggers of onchanges. opw-626635 |
||
---|---|---|
.. | ||
controllers | ||
doc | ||
i18n | ||
static | ||
tests | ||
views | ||
.bowerrc | ||
Gruntfile.js | ||
__init__.py | ||
__openerp__.py | ||
bower.json | ||
package.json |