From 006233c254639b9130cdca954aa046ad2c40efe7 Mon Sep 17 00:00:00 2001 From: MuK IT GmbH Date: Thu, 14 Feb 2019 11:22:10 +0000 Subject: [PATCH] publish muk_utils - 12.0 --- muk_utils/__manifest__.py | 2 +- muk_utils/models/scss_editor.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/muk_utils/__manifest__.py b/muk_utils/__manifest__.py index 9d0db62..5a154f7 100644 --- a/muk_utils/__manifest__.py +++ b/muk_utils/__manifest__.py @@ -19,7 +19,7 @@ { "name": "MuK Utils", "summary": """Utility Features""", - "version": '12.0.1.4.16', + "version": '12.0.1.4.17', "category": 'Extra Tools', "license": "AGPL-3", "author": "MuK IT", diff --git a/muk_utils/models/scss_editor.py b/muk_utils/models/scss_editor.py index e61a4a2..39129f9 100644 --- a/muk_utils/models/scss_editor.py +++ b/muk_utils/models/scss_editor.py @@ -91,6 +91,7 @@ class ScssEditor(models.AbstractModel): def replace_content(self, url, xmlid, content): custom_url = self._get_custom_url(url, xmlid) + custom_view = self._get_custom_view(custom_url) custom_attachment = self._get_custom_attachment(custom_url) datas = base64.b64encode((content or "\n").encode("utf-8")) if custom_attachment.exists(): @@ -104,6 +105,7 @@ class ScssEditor(models.AbstractModel): 'datas_fname': url.split("/")[-1], 'url': custom_url, }) + if not custom_view.exists(): view_to_xpath = self.env["ir.ui.view"].get_related_views( xmlid, bundles=True ).filtered(lambda v: v.arch.find(url) >= 0)