mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[14.0][MIG] rma*: ir.actions.act_window has different access
right in v14. Actions that read those records need to use `sudo` to allow non-admin users to be able to use these actions.
This commit is contained in:
committed by
JasminSForgeFlow
parent
e3ad38147e
commit
552c9432f5
@@ -18,7 +18,7 @@ class RmaOrder(models.Model):
|
||||
|
||||
def action_view_repair_order(self):
|
||||
action = self.env.ref("repair.action_repair_order_tree")
|
||||
result = action.read()[0]
|
||||
result = action.sudo().read()[0]
|
||||
repair_ids = self.mapped("rma_line_ids.repair_ids").ids
|
||||
result["domain"] = [("id", "in", repair_ids)]
|
||||
return result
|
||||
|
||||
@@ -120,7 +120,7 @@ class RmaOrderLine(models.Model):
|
||||
|
||||
def action_view_repair_order(self):
|
||||
action = self.env.ref("repair.action_repair_order_tree")
|
||||
result = action.read()[0]
|
||||
result = action.sudo().read()[0]
|
||||
repair_ids = self.repair_ids.ids
|
||||
if len(repair_ids) != 1:
|
||||
result["domain"] = [("id", "in", repair_ids)]
|
||||
|
||||
Reference in New Issue
Block a user