diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-04-17 17:08:17 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-04-17 17:08:17 +0200 |
| commit | 107b589a11dfa6a81d97d081d8b2bcb60f05b4e9 (patch) | |
| tree | 7ece7add3b1ecf71be6e110827554751c4fc93a8 /addons/web/static/src/js/framework/mixins.js | |
| parent | a9471c43b952a1b3ecd92dcbcc0719723336acf1 (diff) | |
[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...
Diffstat (limited to 'addons/web/static/src/js/framework/mixins.js')
| -rw-r--r-- | addons/web/static/src/js/framework/mixins.js | 9 |
1 files changed, 6 insertions, 3 deletions
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; |
