@@ -259,8 +259,10 @@ def test_08_cost_from_move_multi_step(self):
259
259
"""
260
260
# Alter the customer RMA route to make it multi-step
261
261
# 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
264
266
cust_in_pull_rule = self .customer_route .rule_ids .filtered (
265
267
lambda r : r .location_id == self .stock_rma_location
266
268
)
@@ -275,11 +277,12 @@ def test_08_cost_from_move_multi_step(self):
275
277
"name" : "RMA->Output" ,
276
278
"action" : "pull" ,
277
279
"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 ,
279
281
"location_id" : self .output_location .id ,
280
282
"procure_method" : "make_to_stock" ,
281
283
"route_id" : self .customer_route .id ,
282
284
"picking_type_id" : self .env .ref ("stock.picking_type_internal" ).id ,
285
+ "group_propagation_option" : "propagate" ,
283
286
}
284
287
)
285
288
self .env ["stock.rule" ].create (
@@ -291,7 +294,8 @@ def test_08_cost_from_move_multi_step(self):
291
294
"location_id" : self .customer_location .id ,
292
295
"procure_method" : "make_to_order" ,
293
296
"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" ,
295
299
}
296
300
)
297
301
self .env ["stock.rule" ].create (
@@ -303,19 +307,21 @@ def test_08_cost_from_move_multi_step(self):
303
307
"location_id" : self .input_location .id ,
304
308
"procure_method" : "make_to_stock" ,
305
309
"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" ,
307
312
}
308
313
)
309
314
self .env ["stock.rule" ].create (
310
315
{
311
316
"name" : "Input->RMA" ,
312
317
"action" : "pull" ,
313
318
"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 ,
316
321
"procure_method" : "make_to_order" ,
317
322
"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" ,
319
325
}
320
326
)
321
327
# Set a standard price on the products
0 commit comments