From 107b589a11dfa6a81d97d081d8b2bcb60f05b4e9 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 17 Apr 2015 17:08:17 +0200 Subject: [FIX] *: correct previous forward port Due to files renaming, some patched should be applied manually to the correct files. Forgot to `git add` these files when committing the forward port... --- addons/web/static/src/js/framework/mixins.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'addons/web/static/src/js/framework/mixins.js') diff --git a/addons/web/static/src/js/framework/mixins.js b/addons/web/static/src/js/framework/mixins.js index 0f495392a6c..68c19f6b9f4 100644 --- a/addons/web/static/src/js/framework/mixins.js +++ b/addons/web/static/src/js/framework/mixins.js @@ -297,9 +297,12 @@ var PropertiesMixin = _.extend({}, EventDispatcherMixin, { // this also has the side effect of introducing a dependency on utils. Todo: // remove this, or move it elsewhere. Also, learn OO programming. if (key === 'value' && self.field && self.field.type === 'float' && tmp && val){ - var precision = self.field.digits ? self.field.digits[1] : 2; - if (utils.float_is_zero(tmp - val, precision)) { - return; + var digits = self.field.digits; + if (digits !== 0){ + digits = digits ? digits[1] : 2; + if (utils.float_is_zero(tmp - val, digits)) { + return; + } } } changed = true; -- cgit v1.2.3