mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-23 18:04:34 +00:00
[MIG] attachment_swift: Migration to 14.0
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
{'name': 'Attachments on Swift storage',
|
||||
'summary': 'Store assets and attachments on a Swift compatible object store',
|
||||
'version': '13.0.1.0.0',
|
||||
'version': "14.0.1.0.0",
|
||||
'author': 'Camptocamp,Odoo Community Association (OCA)',
|
||||
'license': 'AGPL-3',
|
||||
'category': 'Knowledge Management',
|
||||
@@ -17,5 +17,5 @@
|
||||
},
|
||||
'website': 'https://www.camptocamp.com',
|
||||
'data': [],
|
||||
'installable': False,
|
||||
'installable': True,
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ class IrAttachment(models.Model):
|
||||
return conn
|
||||
|
||||
@api.model
|
||||
def _store_file_read(self, fname, bin_size=False):
|
||||
def _store_file_read(self, fname):
|
||||
if fname.startswith('swift://'):
|
||||
swifturi = SwiftUri(fname)
|
||||
try:
|
||||
@@ -141,7 +141,7 @@ class IrAttachment(models.Model):
|
||||
'Error reading object from Swift object store')
|
||||
return read
|
||||
else:
|
||||
return super()._store_file_read(fname, bin_size)
|
||||
return super()._store_file_read(fname)
|
||||
|
||||
def _store_file_write(self, key, bin_data):
|
||||
if self._storage() == 'swift':
|
||||
|
||||
Reference in New Issue
Block a user