Browse Source

publish muk_utils - 12.0

pull/30/head
MuK IT GmbH 5 years ago
parent
commit
cde3f5f5ef
  1. 2
      muk_utils/__manifest__.py
  2. 5
      muk_utils/models/base.py
  3. 1
      muk_utils/models/scss_editor.py

2
muk_utils/__manifest__.py

@ -22,7 +22,7 @@
{
"name": "MuK Utils",
"summary": """Utility Features""",
"version": '12.0.2.0.6',
"version": '12.0.2.0.7',
"category": 'Extra Tools',
"license": "LGPL-3",
"author": "MuK IT",

5
muk_utils/models/base.py

@ -50,7 +50,10 @@ class Base(models.AbstractModel):
@api.model
def _check_context_bin_size(self, field):
return any(key in self.env.context for key in ['bin_size', 'bin_size_%s' % (field)])
return any(
key in self.env.context and self.env.context[key]
for key in ['bin_size', 'bin_size_%s' % (field)]
)
#----------------------------------------------------------
# Security

1
muk_utils/models/scss_editor.py

@ -76,6 +76,7 @@ class ScssEditor(models.AbstractModel):
custom_url = self._get_custom_url(url, xmlid)
custom_attachment = self._get_custom_attachment(custom_url)
if custom_attachment.exists():
print(self.env.context, custom_attachment.datas)
return base64.b64decode(custom_attachment.datas).decode('utf-8')
else:
match = re.compile("^/(\w+)/(.+?)(\.custom\.(.+))?\.(\w+)$").match(url)

Loading…
Cancel
Save