From 3636aeb59dd463820ecd1bd5a59f3a1f541da190 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 4 Feb 2015 12:58:19 +0100 Subject: [PATCH] [FIX] web: field on change event This is related to rev. d17f22cde77fd6dd0fb968b1b34883c56648e93e Compare float values using float_is_zeor only if the key is 'value', meaning the changed value is the actual value of the field, not another variable of the field (widget, etc.) For instance, changing the currency_info of a float field using the monetary widget should not compare the old and new value using float_is_zero (the values are not even floats). opw-627166 --- addons/web/static/src/js/openerpframework.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/openerpframework.js b/addons/web/static/src/js/openerpframework.js index 7cd0ae6df86..897a9213c30 100644 --- a/addons/web/static/src/js/openerpframework.js +++ b/addons/web/static/src/js/openerpframework.js @@ -468,7 +468,7 @@ openerp.PropertiesMixin = _.extend({}, openerp.EventDispatcherMixin, { var tmp = self.__getterSetterInternalMap[key]; if (tmp === val) return; - if (self.field && self.field.type === 'float' && tmp && val){ + if (key === 'value' && self.field && self.field.type === 'float' && tmp && val){ var precision = self.field.digits ? self.field.digits[1] : 2; if (openerp.web.float_is_zero(tmp - val, precision)) return;