Skip to content

Commit

Permalink
[16.0][FIX] base_import_async, add sudo call to models without explic…
Browse files Browse the repository at this point in the history
…it access
  • Loading branch information
ChrisOForgeFlow committed Jul 10, 2024
1 parent 20d3436 commit 8e42a72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base_import_async/models/base_import_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def execute_import(self, fields, columns, options, dryrun=False):

# get the translated model name to build
# a meaningful job description
search_result = self.env["ir.model"].name_search(self.res_model, operator="=")
search_result = (

Check warning on line 50 in base_import_async/models/base_import_import.py

View check run for this annotation

Codecov / codecov/patch

base_import_async/models/base_import_import.py#L50

Added line #L50 was not covered by tests
self.env["ir.model"].sudo().name_search(self.res_model, operator="=")
)
if search_result:
translated_model_name = search_result[0][1]
else:
Expand Down

0 comments on commit 8e42a72

Please sign in to comment.