[14.0][FIX] rma, fix permission for action

This commit is contained in:
Giovanni
2022-04-26 16:50:19 +02:00
committed by Nikolaus Weingartmair
parent 07838b0d4e
commit c1f01ed158

View File

@@ -27,7 +27,7 @@ class ResPartner(models.Model):
def action_view_rma(self): def action_view_rma(self):
self.ensure_one() self.ensure_one()
action = self.env.ref("rma.rma_action").read()[0] action = self.sudo().env.ref("rma.rma_action").read()[0]
rma = self.rma_ids rma = self.rma_ids
if len(rma) == 1: if len(rma) == 1:
action.update( action.update(