[FIX] web: digits is not always defined for float fields in js

This rev. is related to d17f22cde7
This commit is contained in:
Denis Ledoux
2015-01-28 18:53:12 +01:00
parent 7126ae8143
commit 457b940c0e
+3 -1
View File
@@ -468,7 +468,9 @@ openerp.PropertiesMixin = _.extend({}, openerp.EventDispatcherMixin, {
var tmp = self.__getterSetterInternalMap[key];
if (tmp === val)
return;
if (self.field && self.field.type === 'float' && tmp && val && openerp.web.float_is_zero(tmp - val, self.field.digits[1])){
if (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;
}
changed = true;