From b9db65aa7340742287dcf10cd0dd1d94266c4d9c Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Mon, 16 Jan 2017 17:25:19 +0100 Subject: [PATCH] [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 --- addons/web/static/src/js/views/form_relational_widgets.js | 6 ++++-- addons/web/static/src/less/notification.less | 2 +- 2 files changed, 5 insertions(+), 3 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 () { diff --git a/addons/web/static/src/less/notification.less b/addons/web/static/src/less/notification.less index 0c910dbc5c5..9c24c2be096 100644 --- a/addons/web/static/src/less/notification.less +++ b/addons/web/static/src/less/notification.less @@ -5,7 +5,7 @@ max-width: 100%; .o-position-absolute(@navbar-height, 0px); - z-index: 50; // same as debug manager. Fixme: expose a variable + z-index: 1050; // above the modals. Fixme: expose a variable .o_notification { padding: 0;