Browse Source

publish muk_utils - 12.0

pull/9/head
MuK IT GmbH 6 years ago
parent
commit
6cfe7efa9c
  1. 2
      muk_utils/__manifest__.py
  2. 10
      muk_utils/models/scss_editor.py

2
muk_utils/__manifest__.py

@ -19,7 +19,7 @@
{
"name": "MuK Utils",
"summary": """Utility Features""",
"version": '12.0.1.4.7',
"version": '12.0.1.4.8',
"category": 'Extra Tools',
"license": "AGPL-3",
"author": "MuK IT",

10
muk_utils/models/scss_editor.py

@ -44,6 +44,9 @@ class ScssEditor(models.AbstractModel):
bin_size=False, bin_size_datas=False
).search([("url", '=', url)])
def _get_custom_view(self, url):
return self.env["ir.ui.view"].search([("name", '=', url)])
def _get_variable(self, content, variable):
regex = r'{0}\:?\s(.*?);'.format(variable)
value = re.search(regex, content)
@ -128,4 +131,9 @@ class ScssEditor(models.AbstractModel):
content = self._replace_variables(
self.get_content(url, xmlid), variables
)
self.replace_content(url, xmlid, content)
self.replace_content(url, xmlid, content)
def reset_values(self, url, xmlid):
custom_url = self._get_custom_url(url, xmlid)
self._get_custom_attachment(custom_url).unlink()
self._get_custom_view(custom_url).unlink()
Loading…
Cancel
Save