From 37a3852c80cbdecca54767ae30e656db05184155 Mon Sep 17 00:00:00 2001 From: Tonow-c2c Date: Mon, 7 Oct 2019 12:46:57 +0200 Subject: [PATCH] BSRD-286: MIG V13 attachement_s3 --- attachment_s3/__manifest__.py | 6 +++--- .../{10.0.1.1.0 => 13.0.0.0.1}/post-migration.py | 2 +- attachment_s3/models/ir_attachment.py | 10 +++++----- attachment_s3/s3uri.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) rename attachment_s3/migrations/{10.0.1.1.0 => 13.0.0.0.1}/post-migration.py (98%) diff --git a/attachment_s3/__manifest__.py b/attachment_s3/__manifest__.py index 8d5e79c..d4e5f59 100644 --- a/attachment_s3/__manifest__.py +++ b/attachment_s3/__manifest__.py @@ -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) {'name': 'Attachments on S3 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)', 'license': 'AGPL-3', 'category': 'Knowledge Management', @@ -14,5 +14,5 @@ }, 'website': 'https://www.camptocamp.com', 'data': [], - 'installable': False, + 'installable': True, } diff --git a/attachment_s3/migrations/10.0.1.1.0/post-migration.py b/attachment_s3/migrations/13.0.0.0.1/post-migration.py similarity index 98% rename from attachment_s3/migrations/10.0.1.1.0/post-migration.py rename to attachment_s3/migrations/13.0.0.0.1/post-migration.py index a8ffd31..a110351 100644 --- a/attachment_s3/migrations/10.0.1.1.0/post-migration.py +++ b/attachment_s3/migrations/13.0.0.0.1/post-migration.py @@ -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) import logging diff --git a/attachment_s3/models/ir_attachment.py b/attachment_s3/models/ir_attachment.py index 09c357d..e0bb796 100644 --- a/attachment_s3/models/ir_attachment.py +++ b/attachment_s3/models/ir_attachment.py @@ -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) @@ -28,7 +28,7 @@ class IrAttachment(models.Model): def _get_stores(self): l = ['s3'] - l += super(IrAttachment, self)._get_stores() + l += super()._get_stores() return l @api.model @@ -133,7 +133,7 @@ class IrAttachment(models.Model): ) return read else: - return super(IrAttachment, self)._store_file_read(fname, bin_size) + return super()._store_file_read(fname, bin_size) @api.model 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) ) else: - _super = super(IrAttachment, self) + _super = super() filename = _super._store_file_write(key, bin_data) return filename @@ -186,4 +186,4 @@ class IrAttachment(models.Model): 'Error during deletion of the file %s' % fname ) else: - super(IrAttachment, self)._store_file_delete(fname) + super()._store_file_delete(fname) diff --git a/attachment_s3/s3uri.py b/attachment_s3/s3uri.py index 36fd580..a7054eb 100644 --- a/attachment_s3/s3uri.py +++ b/attachment_s3/s3uri.py @@ -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) import re