- Set a vendor on Product A
- Create a SO with 1 Unit of A, set the Drop Ship route
- Confirm the SO
=> a PO with 1 Unit is created
- Change the oredered quantity to 2
The PO is updated with a total quantity of 3 instead of 2.
Since the removal of procurements, the quantity is computed based on the
stock moves. However, in this case, no stock move has been created since
the PO is not yet confirmed.
In this specific case, we fall back on the PO line quantity. The logic
is similar to `_quantity_in_progress`.
opw-1879118
Following the previous fixes in stock where we had to handle non-valued
move lines inside a valued move, the valuation of the dropshipping was
bypassed because a dropshipping move is not an in move, nor an out move.
We now value the dropshipping move always positively. We adapt the
sale_stock code that generate the anglo saxon entry to use the abs value
of the move, not -1 * value. It was done this way because all out moves
are negative.
We add 8 tests to test all the valuation cases: continental or anglo
saxon, ordered or delivered, fifo or standard.
opw-1817363
fixes#23214