@@ -8,11 +8,12 @@ def setUp(self):
88 super ().setUp ()
99
1010 self .maintenance_warehouse = self .env ["stock.warehouse" ].create (
11- << << << < HEAD
1211 {"name" : "Test warehouse" , "code" : "TEST" ,}
13- == == == =
1412 {"name" : "Test warehouse" , "code" : "TEST" }
15- >> >> >> > 9 a9e9cf ([MIG ] maintenance_stock : Migration to 13.0 )
13+ {
14+ "name" : "Test warehouse" ,
15+ "code" : "TEST" ,
16+ }
1617 )
1718
1819 self .product1 = self .env ["product.product" ].create (
@@ -111,22 +112,22 @@ def test_picking(self):
111112 self .assertEqual (len (self .equipment_1 .stock_picking_ids ), 0 )
112113
113114 qty_done = 5.0
114- << << << < HEAD
115- == == == =
116115 move_line_data = {
117116 "product_id" : self .product1 .id ,
118117 "product_uom_id" : self .env .ref ("uom.product_uom_unit" ).id ,
119118 "qty_done" : qty_done ,
120119 "location_id" : self .maintenance_warehouse .lot_stock_id .id ,
121120 "location_dest_id" : self .maintenance_warehouse .wh_cons_loc_id .id ,
122121 }
123- >> >> >> > 9 a9e9cf ([MIG ] maintenance_stock : Migration to 13.0 )
122+ location_id = self .maintenance_warehouse .lot_stock_id .id
123+ location_dest_id = self .maintenance_warehouse .wh_cons_loc_id .id
124+ picking_type_id = self .maintenance_warehouse .cons_type_id .id
124125 picking = self .env ["stock.picking" ].create (
125126 {
126127 "maintenance_request_id" : self .request_1 .id ,
127- "picking_type_id" : self . maintenance_warehouse . cons_type_id . id ,
128- "location_id" : self . maintenance_warehouse . lot_stock_id . id ,
129- "location_dest_id" : self . maintenance_warehouse . wh_cons_loc_id . id ,
128+ "picking_type_id" : picking_type_id ,
129+ "location_id" : location_id ,
130+ "location_dest_id" : location_dest_id ,
130131 "move_lines" : [
131132 (
132133 0 ,
@@ -136,10 +137,24 @@ def test_picking(self):
136137 "product_id" : self .product1 .id ,
137138 "product_uom" : self .env .ref ("uom.product_uom_unit" ).id ,
138139 "product_uom_qty" : 5.0 ,
139- "picking_type_id" : self .maintenance_warehouse .cons_type_id .id ,
140- "location_id" : self .maintenance_warehouse .lot_stock_id .id ,
141- "location_dest_id" : self .maintenance_warehouse .wh_cons_loc_id .id ,
142- "move_line_ids" : [(0 , 0 , move_line_data )],
140+ "picking_type_id" : picking_type_id ,
141+ "location_id" : location_id ,
142+ "location_dest_id" : location_dest_id ,
143+ "move_line_ids" : [
144+ (
145+ 0 ,
146+ 0 ,
147+ {
148+ "product_id" : self .product1 .id ,
149+ "product_uom_id" : self .env .ref (
150+ "uom.product_uom_unit"
151+ ).id ,
152+ "qty_done" : qty_done ,
153+ "location_id" : location_id ,
154+ "location_dest_id" : location_dest_id ,
155+ },
156+ )
157+ ],
143158 },
144159 )
145160 ],
0 commit comments