diff --git a/storage_image_import/__manifest__.py b/storage_image_import/__manifest__.py index eb60ee5ea4..ab9ded3c55 100644 --- a/storage_image_import/__manifest__.py +++ b/storage_image_import/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Storage Image Import", "summary": "Add the possibility to import image for csv base on url", - "version": "14.0.1.2.0", + "version": "15.0.1.0.0", "category": "Storage", "website": "https://github.com/OCA/storage", "author": " Akretion, Odoo Community Association (OCA)", diff --git a/storage_image_import/models/image_relation_abstract.py b/storage_image_import/models/image_relation_abstract.py index 08dc93b79b..d985e299cb 100644 --- a/storage_image_import/models/image_relation_abstract.py +++ b/storage_image_import/models/image_relation_abstract.py @@ -33,7 +33,7 @@ def _create_image_from_url(self, url): _logger.error(e) raise ValidationError( _("Fail to import image {} check if the url is valid").format(url) - ) + ) from e def _get_existing_image_from_url(self, url): return self.env["storage.image"].search([("imported_from_url", "=", url)]) diff --git a/storage_image_import/tests/test_import.py b/storage_image_import/tests/test_import.py index 2dd3cedfbc..88a581c63a 100644 --- a/storage_image_import/tests/test_import.py +++ b/storage_image_import/tests/test_import.py @@ -25,7 +25,9 @@ def setUpClass(cls): cls.loader.update_registry((FakeImageRelation,)) # Create some permissions for our fake model - model = cls.env["ir.model"].search([("model", "=", "fake.image.relation")]) + model = ( + cls.env["ir.model"].sudo().search([("model", "=", "fake.image.relation")]) + ) cls.env["ir.model.access"].sudo().create( { "name": "access.tester",