diff options
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
| -rw-r--r-- | addons/web/static/src/js/fields/basic_fields.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index a462efee6e0..e600954b967 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -56,6 +56,23 @@ var DebouncedField = AbstractField.extend({ }, //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + /** + * Debounced fields do not notify the rest of the environment immediately of + * their new state, so it is necessary to actually get their value when this + * method is called. + * + * @override + */ + commitChanges: function () { + if (this.mode === 'edit') { + this._setValue(this._getValue()); + } + }, + + //-------------------------------------------------------------------------- // Private //-------------------------------------------------------------------------- |
