[FIX] stock: fix stock picking done quantity computation
This is an oversight during the port of3de53fa165in the forward port revision3a2147d95cIn the revision3de53fa165, the code has not only been moved, but the variable passed to the method `rereserve_quants` argument `move_ids` changed as well. This has been missed during the port of the revision. This leads to the invalid computation of the `done` quantity in the pickings in some cases were the quants need to be re-reserved. opw-690244
This commit is contained in:
@@ -862,7 +862,7 @@ class Picking(models.Model):
|
||||
moves_reassign = any(x.origin_returned_move_id or x.move_orig_ids for x in picking.move_lines if x.state not in ['done', 'cancel'])
|
||||
if moves_reassign and picking.location_id.usage not in ("supplier", "production", "inventory"):
|
||||
# unnecessary to assign other quants than those involved with pack operations as they will be unreserved anyways.
|
||||
picking.with_context(reserve_only_ops=True, no_state_change=True).rereserve_quants(move_ids=todo_moves.ids)
|
||||
picking.with_context(reserve_only_ops=True, no_state_change=True).rereserve_quants(move_ids=picking.move_lines.ids)
|
||||
picking.do_recompute_remaining_quantities()
|
||||
|
||||
# split move lines if needed
|
||||
|
||||
Reference in New Issue
Block a user