Merge PR #101 into 14.0

Signed-off-by simahawk
This commit is contained in:
OCA-git-bot 2022-02-02 06:47:48 +00:00
commit bed1e55b87
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
action = self.get_formview_action()
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["res_id"] = self.id
views_form = []