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
Marina Alapont
parent
ecf1696396
commit
64c66e791c
@@ -2,7 +2,7 @@
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
|
||||
{
|
||||
"name": "Link Purchase Order to Subcontract Productions",
|
||||
"version": "14.0.1.0.0",
|
||||
"version": "14.0.1.0.1",
|
||||
"category": "Manufacturing",
|
||||
"license": "LGPL-3",
|
||||
"author": "Quartile Limited, Odoo Community Association (OCA)",
|
||||
|
||||
@@ -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