[FIX] stock: _search_picking_for_assignation and immediate transfer

When a move is created through a push rule, the system will first try to
find a picking to put it into before creating a new one. It is possible
the move is placed into an immediate picking where the reservation
fields are hidden and the initial demand is updated according to the
qty_done with [0].

As this behaviour is unwanted, do not merge move into immediate
transfers (which should be short-lived anyway).

[0] 8303b1a69e

closes odoo/odoo#44086

X-original-commit: fa9efd28e6e113cd9993a29bca070ddee83630c0
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit is contained in:
Simon Lejeune
2020-01-28 11:14:16 +00:00
parent 7466f2cae8
commit 17c542b902
+1
View File
@@ -864,6 +864,7 @@ class StockMove(models.Model):
('location_dest_id', '=', self.location_dest_id.id),
('picking_type_id', '=', self.picking_type_id.id),
('printed', '=', False),
('immediate_transfer', '=', False),
('state', 'in', ['draft', 'confirmed', 'waiting', 'partially_available', 'assigned'])], limit=1)
return picking