ai*
This commit is contained in:
1
ai_cloud_storage/models/__init__.py
Normal file
1
ai_cloud_storage/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import ir_attachment
|
||||
11
ai_cloud_storage/models/ir_attachment.py
Normal file
11
ai_cloud_storage/models/ir_attachment.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from odoo import models
|
||||
|
||||
|
||||
class IrAttachment(models.Model):
|
||||
_inherit = 'ir.attachment'
|
||||
|
||||
def _retrieve_image_src_and_mimetype(self):
|
||||
self.ensure_one()
|
||||
if info := self._get_download_info():
|
||||
return {'url': info['url'], 'mimetype': self.mimetype}
|
||||
return super()._retrieve_image_src_and_mimetype()
|
||||
Reference in New Issue
Block a user