mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[FIX] Fix access right issues when using actions
This commit is contained in:
committed by
Meritxell Abellan
parent
5e37f463f2
commit
0c664cd428
@@ -19,7 +19,8 @@ class PurchaseOrder(models.Model):
|
||||
|
||||
def action_view_mrp(self):
|
||||
productions = self.subcontract_production_ids
|
||||
action = self.env.ref("mrp.mrp_production_action").read()[0]
|
||||
xmlid = "mrp.mrp_production_action"
|
||||
action = self.env["ir.actions.act_window"]._for_xml_id(xmlid)
|
||||
if len(productions) > 1:
|
||||
action["domain"] = [("id", "in", productions.ids)]
|
||||
elif len(productions) == 1:
|
||||
|
||||
Reference in New Issue
Block a user