diff --git a/app_common/__manifest__.py b/app_common/__manifest__.py index a9baf512..1b9a15f9 100644 --- a/app_common/__manifest__.py +++ b/app_common/__manifest__.py @@ -33,7 +33,7 @@ { 'name': "odooai Odooapp Common Func", - 'version': '14.21.10.18', + 'version': '14.24.03.11', 'author': 'odooai.cn', 'category': 'Base', 'website': 'https://www.odooai.cn', diff --git a/app_common/models/base.py b/app_common/models/base.py index 26d72f9a..343148cc 100644 --- a/app_common/models/base.py +++ b/app_common/models/base.py @@ -51,6 +51,12 @@ EXCLU_FIELDS = [ class Base(models.AbstractModel): _inherit = 'base' + @api.model + def _app_check_sys_op(self): + if self.env.user.has_group('base.group_erp_manager'): + return True + return False + @api.model def _get_normal_fields(self): f_list = [] @@ -97,7 +103,9 @@ class Base(models.AbstractModel): return dt.astimezone(pytz_timezone).strftime(return_format) @api.model - def get_image_from_url(self, url): + def _get_image_from_url(self, url): + if not self._app_check_sys_op(): + return False if not url: return None try: diff --git a/app_common/static/description/index.html b/app_common/static/description/index.html index b544199d..b305054e 100644 --- a/app_common/static/description/index.html +++ b/app_common/static/description/index.html @@ -4,7 +4,7 @@