@@ -8,11 +8,12 @@ def setUp(self):
8
8
super ().setUp ()
9
9
10
10
self .maintenance_warehouse = self .env ["stock.warehouse" ].create (
11
- << << << < HEAD
12
11
{"name" : "Test warehouse" , "code" : "TEST" ,}
13
- == == == =
14
12
{"name" : "Test warehouse" , "code" : "TEST" }
15
- >> >> >> > 9 a9e9cf ([MIG ] maintenance_stock : Migration to 13.0 )
13
+ {
14
+ "name" : "Test warehouse" ,
15
+ "code" : "TEST" ,
16
+ }
16
17
)
17
18
18
19
self .product1 = self .env ["product.product" ].create (
@@ -111,22 +112,22 @@ def test_picking(self):
111
112
self .assertEqual (len (self .equipment_1 .stock_picking_ids ), 0 )
112
113
113
114
qty_done = 5.0
114
- << << << < HEAD
115
- == == == =
116
115
move_line_data = {
117
116
"product_id" : self .product1 .id ,
118
117
"product_uom_id" : self .env .ref ("uom.product_uom_unit" ).id ,
119
118
"qty_done" : qty_done ,
120
119
"location_id" : self .maintenance_warehouse .lot_stock_id .id ,
121
120
"location_dest_id" : self .maintenance_warehouse .wh_cons_loc_id .id ,
122
121
}
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
124
125
picking = self .env ["stock.picking" ].create (
125
126
{
126
127
"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 ,
130
131
"move_lines" : [
131
132
(
132
133
0 ,
@@ -136,10 +137,24 @@ def test_picking(self):
136
137
"product_id" : self .product1 .id ,
137
138
"product_uom" : self .env .ref ("uom.product_uom_unit" ).id ,
138
139
"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
+ ],
143
158
},
144
159
)
145
160
],
0 commit comments