[FIX] stock: multi-steps, backorders and return
[FIX] stock: multi-steps, backorders and return

1. Activate receipt in 3 steps
2. Make a PO of 50
3. Receive 20 (pick 1), backorder
4. Receive 29 (pick 2), backorder
5. Receive 1 (pick 3)
6. Transfer to quality check location 45 (pick 4), backorder (pick 5)
7. Go to pick 5, unreserve the quantity
8. Go to pick 3, return 1 => the quantity suggested by the return wizard is 1

The return is not able to reserve the necessary quantity.

This happens because 45 units are considerd out (from pick 4), but only
1 unit is considered in (pick 3). Therefore, in the following:

https://github.com/odoo/odoo/blob/23511dffb9e3f597a7df9bb834d008f74abb07b8/addons/stock/models/stock_move.py#L1276

we have `quantity = -44.0` and `available_quantity = 5.0`, so we can't
reserve.

We count as `move_orig_ids` all the siblings coming from
`move_dest_ids`.

opw-2261473

closes odoo/odoo#52084

X-original-commit: ba89e26750baab2309cccc4ffd0b3ade804d19ce
Signed-off-by: Nicolas Martinelli (nim) <771435c469f83f6aa9c405ac5e1ed06314a94f2d@odoo.com>

ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo