Files
odoo_source/addons
alcl-odoo 95ce7a3003 [FIX] stock: Allow better overriding of _action_assign
This commit aims to make easier the overriding of _action_assign by extracting the inner function that retrieves available moves out of it and splitting it in two parts to be able to have a better control on the available moves in and the available moves out.

It is currently not possible to modify the way _action_assign get available moves to create new stock move lines due to the fact that the algorithm is an inner function.

We are currently making a custo that uses consumables and need to change the reserved quantity based on some conditions therefore, the function returns every done stock move line in previous picking and get the wrong result in the end.

For example, let's say we have 3 PACK pickings containing 2, 1 and 3 units of a consumable product respectively. Let the two first PACKS be done, so the OUT picking contains two stock move line, one with 2 units, one with 1 unit. When confirming the last PACK, instead of getting a new stock move line with 3 units, we get two lines, one with 2 units and one with 1 unit because the function looped over all the done stock moves without taking quants into account.

This behaviour is correct but cannot be overriden properly as of now apart from copying the whole function and change what we need.

closes odoo/odoo#110787

X-original-commit: b3d869a3a1ef7591ab846e347f261518fc09f12d
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-01-24 10:20:50 +01:00
..
2023-01-10 14:40:55 +01:00
2022-11-04 09:52:54 +01:00
2022-12-07 18:29:39 +01:00
2023-01-09 15:28:53 +01:00
2023-01-11 07:27:14 +01:00
…