mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[IMP] mrp_multi_level: access action
This commit is contained in:
committed by
Lois Rilo
parent
99830d6688
commit
9502f192df
@@ -50,8 +50,9 @@ class Product(models.Model):
|
||||
|
||||
def action_view_mrp_area_parameters(self):
|
||||
self.ensure_one()
|
||||
action = self.env.ref("mrp_multi_level.product_mrp_area_action")
|
||||
result = action.read()[0]
|
||||
result = self.env["ir.actions.actions"]._for_xml_id(
|
||||
"mrp_multi_level.product_mrp_area_action"
|
||||
)
|
||||
ctx = ast.literal_eval(result.get("context"))
|
||||
if not ctx:
|
||||
ctx = {}
|
||||
|
||||
@@ -26,8 +26,9 @@ class ProductTemplate(models.Model):
|
||||
|
||||
def action_view_mrp_area_parameters(self):
|
||||
self.ensure_one()
|
||||
action = self.env.ref("mrp_multi_level.product_mrp_area_action")
|
||||
result = action.read()[0]
|
||||
result = self.env["ir.actions.actions"]._for_xml_id(
|
||||
"mrp_multi_level.product_mrp_area_action"
|
||||
)
|
||||
ctx = ast.literal_eval(result.get("context"))
|
||||
mrp_areas = self.env["mrp.area"].search([])
|
||||
if "context" not in result:
|
||||
|
||||
Reference in New Issue
Block a user