[FIX] stock: pick a pack

The package level was not set on move lines when a pack was pick. this
was caused by the _check_entire_package method on picking that anly
werked when there was no package_level (pick-pack-ship) and didn't
handle when the pack is picked.
This commit is contained in:
Pierre Masereel
2018-06-12 17:22:00 +02:00
parent b730a6190f
commit 76bb1c60df
+6
View File
@@ -660,6 +660,12 @@ class Picking(models.Model):
picking.move_line_ids.filtered(lambda ml: ml.package_id == pack).write({
'result_package_id': pack.id,
})
else:
picking.move_line_ids.filtered(lambda ml: ml.package_id == pack).write({
'result_package_id': pack.id,
'package_level_id': package_level.id,
})
@api.multi
def do_unreserve(self):
for picking in self: