[FIX] stock: move without package in immediate transfers

Since 29d8fc091a, stock moves in immediate transfers are automatically
assigned. In case of configuration implying to show details action, new
moves disappear in stock picking

Task : 2329116

X-original-commit: 0d3f32988a862bbf13fcfbad37cce903ab4e9d60
This commit is contained in:
William Henrotin
2020-11-30 15:25:13 +00:00
parent 31548cb58f
commit b46f8d64f8
+2 -1
View File
@@ -779,7 +779,7 @@ class Picking(models.Model):
else:
for move in self.move_lines:
if not move.package_level_id:
if move.state in ('assigned', 'done'):
if move.state == 'assigned' and move.picking_id and not move.picking_id.immediate_transfer or move.state == 'done':
if any(not ml.package_level_id for ml in move.move_line_ids):
move_ids_without_package |= move
else:
@@ -1298,6 +1298,7 @@ class Picking(models.Model):
picking_move_lines = self.move_line_ids
if (
not self.picking_type_id.show_reserved
and not self.immediate_transfer
and not self.env.context.get('barcode_view')
):
picking_move_lines = self.move_line_nosuggest_ids