diff options
| author | Sébastien Theys <seb@odoo.com> | 2018-08-21 16:13:23 +0200 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2018-08-22 11:51:30 +0200 |
| commit | 241704536d38f387d076c73c503b36b062a91ff7 (patch) | |
| tree | 4e415511662d4f6a7ed7c4a6b688c387eeac25e8 /addons/web/static/src/js/fields/basic_fields.js | |
| parent | 46bfe9ad6596394a06d98796841f3107bddf3aeb (diff) | |
[FIX] web: allow o2m navigation to work from required inputs
In a one2many, pressing ENTER or TAB from a required input (of type text or char) that is on the last editable column of its line would fail to navigate to next line.
The issue was that the validation of the required field would happen before the change to its value was actually applied.
This commit fixes it.
PR: #26430
Task: 1869469
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
| -rw-r--r-- | addons/web/static/src/js/fields/basic_fields.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index 71b2a14c434..fdefb2cf967 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -114,7 +114,7 @@ var DebouncedField = AbstractField.extend({ */ commitChanges: function () { if (this._isDirty && this.mode === 'edit') { - this._doAction(); + return this._doAction(); } }, @@ -135,7 +135,7 @@ var DebouncedField = AbstractField.extend({ // do anything (commitChanges ensures that if it has local changes, they // are triggered up before the widget is destroyed, if necessary). if (!this.isDestroyed()) { - this._setValue(this._getValue()); + return this._setValue(this._getValue()); } }, /** |
