[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
This commit is contained in:
Sébastien Theys
2018-08-22 11:51:30 +02:00
parent 46bfe9ad65
commit 241704536d
4 changed files with 91 additions and 15 deletions
@@ -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());
}
},
/**