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