diff --git a/mrp_production_request/tests/test_mrp_production_request.py b/mrp_production_request/tests/test_mrp_production_request.py
index 5b480f6cc..3628888d5 100644
--- a/mrp_production_request/tests/test_mrp_production_request.py
+++ b/mrp_production_request/tests/test_mrp_production_request.py
@@ -51,9 +51,7 @@ class TestMrpProductionRequest(TransactionCase):
request.button_to_approve()
request.button_approved()
self.assertEqual(request.pending_qty, 4.0)
- wiz = self.wiz_model.create({
- 'mrp_production_request_id': request.id,
- })
+ wiz = self.wiz_model.with_context(active_ids=request.ids).create({})
wiz.compute_product_line_ids()
wiz.mo_qty = 4.0
wiz.create_mo()
@@ -68,9 +66,7 @@ class TestMrpProductionRequest(TransactionCase):
request and not from manufacturing order."""
proc = self.create_procurement('TEST/02', self.product)
request = proc.mrp_production_request_id
- wiz = self.wiz_model.create({
- 'mrp_production_request_id': request.id,
- })
+ wiz = self.wiz_model.with_context(active_ids=request.ids).create({})
wiz.mo_qty = 4.0
wiz.create_mo()
with self.assertRaises(UserError):
diff --git a/mrp_production_request/views/mrp_production_request_view.xml b/mrp_production_request/views/mrp_production_request_view.xml
index a1da0c212..cb97907e8 100644
--- a/mrp_production_request/views/mrp_production_request_view.xml
+++ b/mrp_production_request/views/mrp_production_request_view.xml
@@ -21,7 +21,6 @@
string="Approve" type="object" class="oe_highlight"
groups="mrp_production_request.group_mrp_production_request_manager"/>