summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2016-01-27 09:47:11 +0100
committerNicolas Lempereur <nle@odoo.com>2016-01-27 12:05:54 +0100
commitb55e29ea86ee8a7d2f3e12234af0f41cfcd00e4e (patch)
tree9273992b0799109d0bc7670c1d6adf974098b2c2 /addons
parent33844226aada5589d6ea3fa1ca9e3946f5c2f019 (diff)
[FIX] web: improve focus/blur one2many dataset
The dataset of an x2m could be set as changed on a focus event, but if the form is currently not in editing, it could stay blocked in this state. This commit add a check so blur and focus on x2m are better coupled. opw-665401
Diffstat (limited to 'addons')
-rw-r--r--addons/web/static/src/js/views/form_relational_widgets.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js
index c2e363c7777..3f39b45de78 100644
--- a/addons/web/static/src/js/views/form_relational_widgets.js
+++ b/addons/web/static/src/js/views/form_relational_widgets.js
@@ -1159,6 +1159,9 @@ var One2ManyListView = X2ManyListView.extend({
return this._super();
},
_on_focus_one2many: function () {
+ if(!this.editor.is_editing()) {
+ return;
+ }
this.dataset.x2m.internal_dataset_changed = true;
this._dataset_changed = false;
this.__focus = true;