Skip to content

Commit

Permalink
[MIG][15.0] storage_image_import: Migration to 15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bizzappdev committed Oct 1, 2024
1 parent add8a48 commit d9972cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion storage_image_import/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
2 changes: 1 addition & 1 deletion storage_image_import/models/image_relation_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _create_image_from_url(self, url):
_logger.error(e)
raise ValidationError(

Check warning on line 34 in storage_image_import/models/image_relation_abstract.py

View check run for this annotation

Codecov / codecov/patch

storage_image_import/models/image_relation_abstract.py#L32-L34

Added lines #L32 - L34 were not covered by tests
_("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)])
Expand Down
4 changes: 3 additions & 1 deletion storage_image_import/tests/test_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit d9972cc

Please sign in to comment.