BSRD-286: MIG V13 attachement_s3

This commit is contained in:
Tonow-c2c
2019-10-08 17:13:34 +02:00
parent 529ae1052f
commit 37a3852c80
4 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -1,10 +1,10 @@
# Copyright 2016-2018 Camptocamp SA # Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
{'name': 'Attachments on S3 storage', {'name': 'Attachments on S3 storage',
'summary': 'Store assets and attachments on a S3 compatible object storage', 'summary': 'Store assets and attachments on a S3 compatible object storage',
'version': '12.0.1.0.0', 'version': '13.0.1.0.0',
'author': 'Camptocamp,Odoo Community Association (OCA)', 'author': 'Camptocamp,Odoo Community Association (OCA)',
'license': 'AGPL-3', 'license': 'AGPL-3',
'category': 'Knowledge Management', 'category': 'Knowledge Management',
@@ -14,5 +14,5 @@
}, },
'website': 'https://www.camptocamp.com', 'website': 'https://www.camptocamp.com',
'data': [], 'data': [],
'installable': False, 'installable': True,
} }
@@ -1,4 +1,4 @@
# Copyright 2016-2018 Camptocamp SA # Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
import logging import logging
+5 -5
View File
@@ -1,4 +1,4 @@
# Copyright 2016-2018 Camptocamp SA # Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
@@ -28,7 +28,7 @@ class IrAttachment(models.Model):
def _get_stores(self): def _get_stores(self):
l = ['s3'] l = ['s3']
l += super(IrAttachment, self)._get_stores() l += super()._get_stores()
return l return l
@api.model @api.model
@@ -133,7 +133,7 @@ class IrAttachment(models.Model):
) )
return read return read
else: else:
return super(IrAttachment, self)._store_file_read(fname, bin_size) return super()._store_file_read(fname, bin_size)
@api.model @api.model
def _store_file_write(self, key, bin_data): def _store_file_write(self, key, bin_data):
@@ -156,7 +156,7 @@ class IrAttachment(models.Model):
_('The file could not be stored: %s') % str(error) _('The file could not be stored: %s') % str(error)
) )
else: else:
_super = super(IrAttachment, self) _super = super()
filename = _super._store_file_write(key, bin_data) filename = _super._store_file_write(key, bin_data)
return filename return filename
@@ -186,4 +186,4 @@ class IrAttachment(models.Model):
'Error during deletion of the file %s' % fname 'Error during deletion of the file %s' % fname
) )
else: else:
super(IrAttachment, self)._store_file_delete(fname) super()._store_file_delete(fname)
+1 -1
View File
@@ -1,4 +1,4 @@
# Copyright 2016-2018 Camptocamp SA # Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
import re import re