Skip to content
Snippets Groups Projects
Commit 8d0e49ce authored by Arnold Moyaux's avatar Arnold Moyaux
Browse files

[FIX] stock_picking_batch: wave take incorrect stock.move


Usecase to reproduce:
- Product A 0 unit in stock
- Product B 10 unit in stock
- Create planned delivery with product A and B
- Do a wave transfer and selected reserved `stock.move.line` from
product B

Current behavior:
The whole picking is move into the batch

Desired behavior:
The picking is splitted and only the move for product B is in a new
batch

It happens because the add_to_wave function check if all the picking
`stock.move.line` are in the `stock.move.line` to batch. If it's the
case, it moves the picking in the new batch. However in our case,
some `stock.move` are not reserve and should not be move in the new
batch. Also check if all the quantity is reserve on the `stock.move`
if it's not the case split the move to only put the reserve quantity
in the wave picking

closes odoo/odoo#85038

X-original-commit: afe2a3a7f913459d88ef197e63bc897fda5f90f8
Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
parent d6ecbf36
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment