diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-04-05 19:27:34 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-04-05 19:27:34 +0200 |
| commit | aa6ebd146ad6ddaebb9ba7c5d93f2f87743dc248 (patch) | |
| tree | 223d12d01e74e0bf41eed57a80fc6bfaeea61cea /addons/web/static/src/js/framework | |
| parent | 7014579d2222c6b4fa694e57853fe3fedb9cc55b (diff) | |
| parent | 549daaaba455f883aa480a88fbf5df884d5555d0 (diff) | |
[MERGE] forward port of branch saas-9 up to 549daaa
Diffstat (limited to 'addons/web/static/src/js/framework')
| -rw-r--r-- | addons/web/static/src/js/framework/mixins.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/addons/web/static/src/js/framework/mixins.js b/addons/web/static/src/js/framework/mixins.js index 40bdaeb51b4..05d4105e466 100644 --- a/addons/web/static/src/js/framework/mixins.js +++ b/addons/web/static/src/js/framework/mixins.js @@ -336,9 +336,8 @@ var PropertiesMixin = _.extend({}, EventDispatcherMixin, { // remove this, or move it elsewhere. Also, learn OO programming. if (key === 'value' && self.field && self.field.type === 'float' && tmp && val){ var digits = self.field.digits; - if (digits !== 0){ - digits = digits ? digits[1] : 2; - if (utils.float_is_zero(tmp - val, digits)) { + if (_.isArray(digits)) { + if (utils.float_is_zero(tmp - val, digits[1])) { return; } } @@ -366,4 +365,3 @@ return { }; }); - |
