summaryrefslogtreecommitdiff
path: root/addons/stock/models/stock_picking.py
diff options
context:
space:
mode:
authorWilliam Henrotin <whe@odoo.com>2020-09-10 12:08:20 +0000
committerWilliam Henrotin <whe@odoo.com>2020-11-27 12:13:00 +0000
commit0d3f32988a862bbf13fcfbad37cce903ab4e9d60 (patch)
tree7ae2b40a26695463c29002fece7dac903c862cf0 /addons/stock/models/stock_picking.py
parent08394c89407fba69b78ba1f82846501efd5c9c87 (diff)
[FIX] stock: move without package in immediate transfers
Since 29d8fc091ab5, 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
Diffstat (limited to 'addons/stock/models/stock_picking.py')
-rw-r--r--addons/stock/models/stock_picking.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py
index a5a71c1da52..ea5cfb4ee36 100644
--- a/addons/stock/models/stock_picking.py
+++ b/addons/stock/models/stock_picking.py
@@ -785,7 +785,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:
@@ -1304,6 +1304,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