|
@ -44,6 +44,12 @@ class ResConfigSettings(models.TransientModel): |
|
|
@api.multi |
|
|
@api.multi |
|
|
def set_values(self): |
|
|
def set_values(self): |
|
|
res = super(ResConfigSettings, self).set_values() |
|
|
res = super(ResConfigSettings, self).set_values() |
|
|
|
|
|
colors = self.env['muk_utils.scss_editor'].get_values( |
|
|
|
|
|
SCSS_URL, XML_ID, ['o-brand-odoo', 'o-brand-primary'] |
|
|
|
|
|
) |
|
|
|
|
|
brand_changed = self.theme_color_brand != colors['o-brand-odoo'] |
|
|
|
|
|
primary_changed = self.theme_color_primary != colors['o-brand-primary'] |
|
|
|
|
|
if(brand_changed or primary_changed): |
|
|
variables = [ |
|
|
variables = [ |
|
|
{'name': 'o-brand-odoo', 'value': self.theme_color_brand or "#243742"}, |
|
|
{'name': 'o-brand-odoo', 'value': self.theme_color_brand or "#243742"}, |
|
|
{'name': 'o-brand-primary', 'value': self.theme_color_primary or "#5D8DA8"}, |
|
|
{'name': 'o-brand-primary', 'value': self.theme_color_primary or "#5D8DA8"}, |
|
|