odoo/odoo#137304

Created by fw-bot
Merged at 7eff6be2046e41e89469c9ebb270de2fb6d77c83

Statuses:

label
odoo-dev:saas-15.2-15.0-opw-3379457-unbruildSVL-waha-nbjw-fw
head
ba32dfca0be7f6fe63f7df9b181d5a95a25b3826
merged
2 years ago by Walid Hanniche (waha)
odoo/odoo
15.0 #137252
saas-15.2 #137304
16.0 #137312
saas-16.1 #137322
saas-16.2 #137332
saas-16.3 #137339
saas-16.4 #137346
17.0
18.0
saas-18.1
saas-18.2
saas-18.3
master #137353

[FW][FIX] mrp_account: correct component price unbuild

Steps to reproduce:
- Create a component C (automated/FIFO)
- Create and confirm two PO for C
qty: 1, price: 10
qty: 1, price: 20
- Make an MO with C as a component
- Unbuild that MO

Bug:
The valuation of the new component C is wrong, the new move in is valued at the current product cost instead of its original value.

Fix:
create moves as a return to get the correct value

opw-3379457

Forward-Port-Of: #137252