From c547b92aa98fcb330efdc3a2b6f1378424d3e707 Mon Sep 17 00:00:00 2001 From: Chill Date: Wed, 15 Nov 2023 14:30:10 +0800 Subject: [PATCH] Create attachments without setting website_id --- app_common/__manifest__.py | 2 +- app_common/models/base.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app_common/__manifest__.py b/app_common/__manifest__.py index 601c2c18..fbb3c337 100644 --- a/app_common/__manifest__.py +++ b/app_common/__manifest__.py @@ -39,7 +39,7 @@ { 'name': "odooAi Common Util and Tools,欧度智能基础核心优化", - 'version': '16.23.11.12', + 'version': '16.23.11.15', '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 a248dabf..68572c0a 100644 --- a/app_common/models/base.py +++ b/app_common/models/base.py @@ -113,6 +113,7 @@ class Base(models.AbstractModel): attachment = self.env['ir.attachment'].create({ 'datas': image, 'name': file_name, + 'website_id': False, }) return attachment else: @@ -125,6 +126,7 @@ class Base(models.AbstractModel): attachment = self.env['ir.attachment'].create({ 'datas': image, 'name': file_name, + 'website_id': False, }) return attachment else: