Steps to reproduce the bug:
- Create a storable product C1:
- standard_price: $10
- Update the quantity to 2 units
- Create a storable product P1 with BoM:
- Component: 1 unit of C1
- Create a MO to produce 1 unit of P1:
- Confirm it
- Update the price of C1 to $20
- Go back to the MO and set the quantity consumed of C1 to 2
- Mark the MO as done
- Confirm the difference in consumption
Problem:
Another move is created with 1 unit of C1 consumed but is not merged
with the first move because the two moves were created with different
prices, making them incompatible for merging.
Solution:
There's no need to create the moves with `price_unit`.
OPW-3791816
closesodoo/odoo#163175
Signed-off-by: William Henrotin (whe) <whe@odoo.com>