summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/form_relational_widgets.js
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2017-01-16 17:25:19 +0100
committerNicolas Lempereur <nle@odoo.com>2017-01-19 16:46:33 +0100
commitb9db65aa7340742287dcf10cd0dd1d94266c4d9c (patch)
treea7a8feeec4a7a257cec926856cc77ee6192f3725 /addons/web/static/src/js/views/form_relational_widgets.js
parent586496338b8d2680a918c3a015baf37192a781df (diff)
[FIX] web: display warning message for o2m modal
Be a little less strict when not showing o2m list view warning so if the o2m is not editable (a modal is open instead of editing inline) we still show warnings. Also have warnings over modal overlays so they can be used for modals. opw-702333
Diffstat (limited to 'addons/web/static/src/js/views/form_relational_widgets.js')
-rw-r--r--addons/web/static/src/js/views/form_relational_widgets.js6
1 files changed, 4 insertions, 2 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 4ceded791be..75bbfe0412d 100644
--- a/addons/web/static/src/js/views/form_relational_widgets.js
+++ b/addons/web/static/src/js/views/form_relational_widgets.js
@@ -1070,8 +1070,10 @@ var One2ManyListView = X2ManyListView.extend({
this._dataset_changed = false;
});
- this.on('warning', this, function(e) { // In case of a one2many, we do not want any warning which comes from the editor
- e.stop_propagation();
+ this.on('warning', this, function(e) { // In case of editable list view, we do not want any warning which comes from the editor
+ if (this.editable()) {
+ e.stop_propagation();
+ }
});
},
do_add_record: function () {