[FIX] s_env_data_encryption: fix access right issues when using actions

This commit is contained in:
Sébastien Alix 2022-01-31 10:09:04 +01:00 committed by Florian da Costa
parent 9051f5fc67
commit 75d98bf433
1 changed files with 3 additions and 1 deletions

View File

@ -56,7 +56,9 @@ class ServerEnvMixin(models.AbstractModel):
# We don't know which action we are using... take default one # We don't know which action we are using... take default one
action = self.get_formview_action() action = self.get_formview_action()
else: else:
action = self.env["ir.actions.act_window"].browse(action_id).read()[0] action = (
self.env["ir.actions.act_window"].browse(action_id).sudo().read()[0]
)
action["view_mode"] = "form" action["view_mode"] = "form"
action["res_id"] = self.id action["res_id"] = self.id
views_form = [] views_form = []