[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
This commit is contained in:
Nicolas Lempereur
2016-01-27 12:05:54 +01:00
parent 33844226aa
commit b55e29ea86
@@ -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;