diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2016-01-27 09:47:11 +0100 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2016-01-27 12:05:54 +0100 |
| commit | b55e29ea86ee8a7d2f3e12234af0f41cfcd00e4e (patch) | |
| tree | 9273992b0799109d0bc7670c1d6adf974098b2c2 /addons/web/static/src/js | |
| parent | 33844226aada5589d6ea3fa1ca9e3946f5c2f019 (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/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/form_relational_widgets.js | 3 |
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; |
