Files
odoo_source/addons/stock_picking_batch
Arnold Moyaux 8d0e49ce62 [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: Arnold Moyaux <arm@odoo.com>
2022-02-21 16:08:01 +00:00
..