diff --git a/app_common/__manifest__.py b/app_common/__manifest__.py index 9de77fb4..041bbe02 100644 --- a/app_common/__manifest__.py +++ b/app_common/__manifest__.py @@ -39,7 +39,7 @@ { 'name': "odooAi Common Util and Tools", - 'version': '24.03.29', + 'version': '24.04.18', '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 a9f178c4..f9aa597c 100644 --- a/app_common/models/base.py +++ b/app_common/models/base.py @@ -125,6 +125,8 @@ class Base(models.AbstractModel): 'datas': image, 'name': file_name, 'website_id': False, + 'res_model': self._name, + 'res_id': self.id, }) attachment.generate_access_token() return attachment @@ -145,6 +147,8 @@ class Base(models.AbstractModel): 'datas': image, 'name': file_name, 'website_id': False, + 'res_model': self._name, + 'res_id': self.id, }) attachment.generate_access_token() return attachment