From 551dc26940f2f33af7fa71c7d1256fe4f2f2fd8f Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Wed, 30 Aug 2017 08:55:03 +0200 Subject: [FIX] web: tab navigation in editable list with create="0" Before this rev., when the user pressed 'TAB' in the last cell of the last row of an editable list with attribute create="0", a new line was added to the list, thus totally ignoring the attribute. Now, it goes back to the first cell of the first row instead, as it was before the new views. Closes #19053 --- addons/web/static/src/js/fields/relational_fields.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/fields') diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js index e05a53194c3..67218e5decd 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -1063,7 +1063,11 @@ var FieldOne2Many = FieldX2Many.extend({ ev.stopPropagation(); if (this.editable) { - if (!this.creatingRecord) { + if (!this.activeActions.create) { + if (ev.data.onFail) { + ev.data.onFail(); + } + } else if (!this.creatingRecord) { this.creatingRecord = true; this._setValue({ operation: 'CREATE', -- cgit v1.2.3