From 20df344078153d27977012a470ac7d6729e1e61f Mon Sep 17 00:00:00 2001 From: Chill Date: Thu, 18 Apr 2024 14:44:17 +0800 Subject: [PATCH] #I9DAQT image2attachment show in select in media --- app_common/__manifest__.py | 2 +- app_common/models/base.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app_common/__manifest__.py b/app_common/__manifest__.py index 25f45f8e..f35c2aeb 100644 --- a/app_common/__manifest__.py +++ b/app_common/__manifest__.py @@ -39,7 +39,7 @@ { 'name': "odooAi Common Util and Tools,欧度智能基础核心优化", - 'version': '16.24.04.07', + 'version': '16.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 d8f545f1..57eda02f 100644 --- a/app_common/models/base.py +++ b/app_common/models/base.py @@ -126,6 +126,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 @@ -146,6 +148,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