[FIX] web_company_color: Changing just one color fixed

Before it didn't work if just a color was set because it couldn't find "color_navbar_bg_hover".
Moreover, in odoo enterprise the navbar background color only worked for the main app menu,
now it works for both main app menu and the navbar of the apps.
pull/3025/head
EvaSForgeFlow 2023-08-30 16:35:49 +02:00 committed by ArnauCForgeFlow
parent 83ffa5c63c
commit 23238138d6
1 changed files with 2 additions and 4 deletions

View File

@ -16,6 +16,7 @@ class ResCompany(models.Model):
SCSS_TEMPLATE = """
.o_main_navbar {
background: %(color_navbar_bg)s !important;
background-color: %(color_navbar_bg)s !important;
color: %(color_navbar_text)s !important;
@ -169,10 +170,7 @@ class ResCompany(models.Model):
values.update(
{
"color_navbar_bg": (values.get("color_navbar_bg") or "$o-brand-odoo"),
"color_navbar_bg_hover": (
values.get("color_navbar_bg_hover")
or "$o-navbar-inverse-link-hover-bg"
),
"color_navbar_bg_hover": (values.get("color_navbar_bg_hover")),
"color_navbar_text": (values.get("color_navbar_text") or "#FFF"),
"color_button_bg": values.get("color_button_bg") or "$primary",
"color_button_bg_hover": values.get("color_button_bg_hover")