Skip to content
Snippets Groups Projects
Commit 7a50bcd8 authored by Arnold Moyaux's avatar Arnold Moyaux Committed by roen-odoo
Browse files

[FIX] pos_sale: Pick from reserved stock.move.line


Usecase to reproduce:
- Set reservation method to closest location
- Set the POS as real time stock
- Put 1 unit in A and 1 unit in location B
- Create a SO for 1 unit
- Sell it in the POS

Expected behavior:
The unit has been taken from the reservation in location A

Current behavior:
The unit is taken from B

It happens because the SO is unreserved after the new picking
and stock.move.line creation. Since the unit is reserved, he
can't pick it and take a random ones.
The solution here is to unreserve the related stock.move to
free the reserved unit, it will not always be the same than the
SO but it will consider it in the removal strategy. It could
also fix the case where only 1 unit remains in stock and he won't
pick it.

opw-3271217

closes odoo/odoo#121695

Signed-off-by: default avatarEngels Robin (roen) <roen@odoo.com>
parent 8cbea173
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment