mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
Create attachments without setting website_id
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user