I'm trying to create order deliveries for sale order
What can i set the value of picking_type_id in the following function to work correctly when i click on confirm button?
def action_confirm(self):
res = super(SaleOrder, self)
locations = []
for line in res.order_line:
if line.warehouse_ids not in locations:
locations.append(line.warehouse_ids)
picking_vals = {
'partner_id': res.partner_shipping_id.id,
'location_id': line.warehouse_ids.id,
'location_dest_id': res.partner_shipping_id.property_stock_customer.id,
'picking_type_id': ,
'sale_id': res.id
}
self.env['stock.picking'].create(picking_vals)
return res