@@ -259,8 +259,10 @@ def test_08_cost_from_move_multi_step(self):
259259 """
260260 # Alter the customer RMA route to make it multi-step
261261 # Get rid of the duplicated rule
262- self .env .ref ("rma.rule_rma_customer_out_pull" ).active = False
263- self .env .ref ("rma.rule_rma_customer_in_pull" ).active = False
262+ self .customer_route .rule_ids .active = False
263+ self .env ["stock.location.route" ].search ([]).active = False
264+ self .customer_route .active = True
265+ # to be able to receive in in WH
264266 cust_in_pull_rule = self .customer_route .rule_ids .filtered (
265267 lambda r : r .location_id == self .stock_rma_location
266268 )
@@ -275,11 +277,12 @@ def test_08_cost_from_move_multi_step(self):
275277 "name" : "RMA->Output" ,
276278 "action" : "pull" ,
277279 "warehouse_id" : self .wh .id ,
278- "location_src_id" : self .env . ref ( "rma.location_rma" ) .id ,
280+ "location_src_id" : self .wh . lot_rma_id .id ,
279281 "location_id" : self .output_location .id ,
280282 "procure_method" : "make_to_stock" ,
281283 "route_id" : self .customer_route .id ,
282284 "picking_type_id" : self .env .ref ("stock.picking_type_internal" ).id ,
285+ "group_propagation_option" : "propagate" ,
283286 }
284287 )
285288 self .env ["stock.rule" ].create (
@@ -291,7 +294,8 @@ def test_08_cost_from_move_multi_step(self):
291294 "location_id" : self .customer_location .id ,
292295 "procure_method" : "make_to_order" ,
293296 "route_id" : self .customer_route .id ,
294- "picking_type_id" : self .env .ref ("stock.picking_type_internal" ).id ,
297+ "picking_type_id" : self .env .ref ("stock.picking_type_out" ).id ,
298+ "group_propagation_option" : "propagate" ,
295299 }
296300 )
297301 self .env ["stock.rule" ].create (
@@ -303,19 +307,21 @@ def test_08_cost_from_move_multi_step(self):
303307 "location_id" : self .input_location .id ,
304308 "procure_method" : "make_to_stock" ,
305309 "route_id" : self .customer_route .id ,
306- "picking_type_id" : self .env .ref ("stock.picking_type_internal" ).id ,
310+ "picking_type_id" : self .env .ref ("stock.picking_type_in" ).id ,
311+ "group_propagation_option" : "propagate" ,
307312 }
308313 )
309314 self .env ["stock.rule" ].create (
310315 {
311316 "name" : "Input->RMA" ,
312317 "action" : "pull" ,
313318 "warehouse_id" : self .wh .id ,
314- "location_src_id" : self .customer_location .id ,
315- "location_id" : self .env . ref ( "rma.location_rma" ) .id ,
319+ "location_src_id" : self .input_location .id ,
320+ "location_id" : self .wh . lot_rma_id .id ,
316321 "procure_method" : "make_to_order" ,
317322 "route_id" : self .customer_route .id ,
318- "picking_type_id" : self .env .ref ("stock.picking_type_in" ).id ,
323+ "picking_type_id" : self .env .ref ("stock.picking_type_internal" ).id ,
324+ "group_propagation_option" : "propagate" ,
319325 }
320326 )
321327 # Set a standard price on the products
0 commit comments