image2attachment show in media

This commit is contained in:
Chill
2024-04-18 14:46:59 +08:00
parent 67373c62f0
commit dc39d47c0c
2 changed files with 5 additions and 1 deletions

View File

@@ -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',

View File

@@ -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