From 4c2dff9205acdd4d147d15d103a2bab18eda6f8d Mon Sep 17 00:00:00 2001 From: Samuel Degueldre Date: Mon, 25 Jul 2022 07:05:53 +0000 Subject: [PATCH] [FIX] web: fix enterprise badge in settings being hidden and wrong color After the bootstrap migration, the enterprise badge in the settings view were the wrong color because the class bg-primary was not adapted. This commit fixes that. After the wowl views merge, the badge has become hidden behind the navbar, because it can no longer modify the DOM of its label as it is managed by owl. When there is no label, the widget appends the badge to its own $el, and uses position: absolute to position it. This didn't work because the closest parent that was positioned was the view itself. This commit fixes that by giving a position: relative to the settings box. closes odoo/odoo#96580 Signed-off-by: Aaron Bohy (aab) --- addons/web/static/src/legacy/js/fields/upgrade_fields.js | 2 +- .../src/webclient/settings_form_view/settings_form_view.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/legacy/js/fields/upgrade_fields.js b/addons/web/static/src/legacy/js/fields/upgrade_fields.js index 141aa616c92..343159cf22a 100644 --- a/addons/web/static/src/legacy/js/fields/upgrade_fields.js +++ b/addons/web/static/src/legacy/js/fields/upgrade_fields.js @@ -94,7 +94,7 @@ var AbstractFieldUpgrade = { this._super.apply(this, arguments); this._insertEnterpriseLabel($("", { text: "Enterprise", - 'class': "badge bg-primary oe_inline o_enterprise_label" + 'class': "badge text-bg-primary oe_inline o_enterprise_label" })); }, /** diff --git a/addons/web/static/src/webclient/settings_form_view/settings_form_view.scss b/addons/web/static/src/webclient/settings_form_view/settings_form_view.scss index 426288e06d1..9e4f6fbd071 100644 --- a/addons/web/static/src/webclient/settings_form_view/settings_form_view.scss +++ b/addons/web/static/src/webclient/settings_form_view/settings_form_view.scss @@ -18,6 +18,7 @@ .o_setting_box { margin-bottom: 8px; margin-top: 8px; + position: relative; } .o_setting_left_pane {