From cde3f5f5efc151cc0abc60e2bbf1d04f498ee982 Mon Sep 17 00:00:00 2001 From: MuK IT GmbH Date: Wed, 20 Nov 2019 00:04:32 +0000 Subject: [PATCH] publish muk_utils - 12.0 --- muk_utils/__manifest__.py | 2 +- muk_utils/models/base.py | 5 ++++- muk_utils/models/scss_editor.py | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/muk_utils/__manifest__.py b/muk_utils/__manifest__.py index 1f3b451..15caa14 100644 --- a/muk_utils/__manifest__.py +++ b/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", diff --git a/muk_utils/models/base.py b/muk_utils/models/base.py index 8e5039f..9584423 100644 --- a/muk_utils/models/base.py +++ b/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 diff --git a/muk_utils/models/scss_editor.py b/muk_utils/models/scss_editor.py index dd5fd18..d74bac2 100644 --- a/muk_utils/models/scss_editor.py +++ b/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)