From c7f72248a9619a38cf91d8d35a10dc94b0c7e5a5 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 11 Oct 2018 16:31:24 +0000 Subject: [PATCH] [FIX] web: clear all BS4 alerts Commit https://github.com/odoo/odoo/commit/8caf84f70ada259f041b424d37686845604d182a was not handling the case where there was an invisible DOM element between the button box and the alert component. Let us clear all alerts. This commit also introduces a way to properly fix/extend bootstrap in future fixes/updates (some of our rules may already be moved in that file once it is forward-ported to master). closes odoo/odoo#27662 --- addons/web/static/src/scss/bootstrap_review.scss | 10 ++++++++++ addons/web/static/src/scss/form_view_extra.scss | 2 ++ addons/web/views/webclient_templates.xml | 1 + 3 files changed, 13 insertions(+) create mode 100644 addons/web/static/src/scss/bootstrap_review.scss diff --git a/addons/web/static/src/scss/bootstrap_review.scss b/addons/web/static/src/scss/bootstrap_review.scss new file mode 100644 index 00000000000..4efc59da2cf --- /dev/null +++ b/addons/web/static/src/scss/bootstrap_review.scss @@ -0,0 +1,10 @@ +/// +/// This file regroups the CSS rules made to fix/extend bootstrap in all places +/// where it is used in Odoo (backend / frontend / reports / ...) +/// + +.alert { + // Alerts are block elements with relative positioning. + // They would go over floating elements, which is never what we want. + clear: both; +} diff --git a/addons/web/static/src/scss/form_view_extra.scss b/addons/web/static/src/scss/form_view_extra.scss index d40c21fa5f2..277537beab4 100644 --- a/addons/web/static/src/scss/form_view_extra.scss +++ b/addons/web/static/src/scss/form_view_extra.scss @@ -41,6 +41,8 @@ } } + // TODO remove me in master (this rule is a copy of the one in the + // bootstrap_review.scss file) + .alert { clear: both; } diff --git a/addons/web/views/webclient_templates.xml b/addons/web/views/webclient_templates.xml index 404c62430c8..80284eda520 100644 --- a/addons/web/views/webclient_templates.xml +++ b/addons/web/views/webclient_templates.xml @@ -40,6 +40,7 @@ +