[MIG] bi_view_editor: Migration to 15.0

This commit is contained in:
ilo
2023-03-08 11:22:45 -03:00
committed by hugues de keyzer
parent 2a8c2e8514
commit c7fbaa4db2
8 changed files with 53 additions and 57 deletions

View File

@@ -393,7 +393,7 @@ class BveView(models.Model):
if self.state != "created":
return
self = self.sudo()
model = self.env["ir.model"].search([("model", "=", self.model_name)])
model = self.env["ir.model"].sudo().search([("model", "=", self.model_name)])
IrTranslation = self.env["ir.translation"]
IrTranslation.translate_fields("ir.model", model.id)
for field in model.field_id:

View File

@@ -69,7 +69,9 @@ class IrModel(models.Model):
count_check += _check_contains(model_model)
count_check += _check_unknown(model_name)
if not count_check:
return self.env["ir.model.access"].check(model["model"], "read", False)
return (
self.env["ir.model.access"].sudo().check(model["model"], "read", False)
)
return False
def get_model_list(self, model_table_map):