Browse Source

publish muk_web_theme - 12.0

pull/48/head
MuK IT GmbH 6 years ago
parent
commit
a947962263
  1. 2
      muk_web_theme/__manifest__.py
  2. 6
      muk_web_theme/models/res_config_settings.py

2
muk_web_theme/__manifest__.py

@ -19,7 +19,7 @@
{ {
"name": "MuK Backend Theme", "name": "MuK Backend Theme",
"summary": "Odoo 12.0 community backend theme", "summary": "Odoo 12.0 community backend theme",
"version": "12.0.1.1.15",
"version": "12.0.1.1.16",
"category": "Themes/Backend", "category": "Themes/Backend",
"license": "AGPL-3", "license": "AGPL-3",
"author": "MuK IT", "author": "MuK IT",

6
muk_web_theme/models/res_config_settings.py

@ -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"},

Loading…
Cancel
Save