1241
1252
# draft packing for this shipment - some draft packing can already be done for this shipment, so we filter according to state
1242
1253
draft_packing_ids = pick_obj.search(cr, uid, [('shipment_id', '=', shipment.id), ('state', '=', 'draft'), ], context=context)
1243
1254
for draft_packing in pick_obj.browse(cr, uid, draft_packing_ids, context=context):
1246
1266
# we check if the corresponding draft packing can be moved to done.
1247
1267
# if all packing with backorder_id equal to draft are done or canceled
1248
1268
# and the quantity for each stock move (state != done) of the draft packing is equal to zero