From 8e42a72e908f669690f6895a6b0f98bbd9cee6f0 Mon Sep 17 00:00:00 2001 From: Christopher Ormaza Date: Wed, 10 Jul 2024 08:44:07 -0500 Subject: [PATCH] [16.0][FIX] base_import_async, add sudo call to models without explicit access --- base_import_async/models/base_import_import.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base_import_async/models/base_import_import.py b/base_import_async/models/base_import_import.py index 851478adae..c9fa41b80f 100644 --- a/base_import_async/models/base_import_import.py +++ b/base_import_async/models/base_import_import.py @@ -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 = ( + self.env["ir.model"].sudo().name_search(self.res_model, operator="=") + ) if search_result: translated_model_name = search_result[0][1] else: