summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-08-30 08:55:03 +0200
committerAaron Bohy <aab@odoo.com>2017-08-30 11:23:28 +0200
commit551dc26940f2f33af7fa71c7d1256fe4f2f2fd8f (patch)
treedda21184a4d390232d8d923beedae9240b398020 /addons/web/static/src/js/fields
parent4f61e7f0481fa2e2bfd806d92ea77f07b78d42de (diff)
[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
Diffstat (limited to 'addons/web/static/src/js/fields')
-rw-r--r--addons/web/static/src/js/fields/relational_fields.js6
1 files changed, 5 insertions, 1 deletions
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',