[FIX] Fixed normal user access error on _selection_related_model_instance to ir.model, sudo is required here
This commit is contained in:
parent
23ec60a8cf
commit
61b0800e69
@ -33,7 +33,7 @@ class MailActivity(models.Model):
|
|||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def _selection_related_model_instance(self):
|
def _selection_related_model_instance(self):
|
||||||
models = self.env["ir.model"].search([("is_mail_activity", "=", True)])
|
models = self.env["ir.model"].sudo().search([("is_mail_activity", "=", True)])
|
||||||
return [(model.model, model.name) for model in models]
|
return [(model.model, model.name) for model in models]
|
||||||
|
|
||||||
def open_origin(self):
|
def open_origin(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user