Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX] base_import_async, add sudo call to models without explicit access #671

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@

# 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
Loading