ImprovedHighlight of Weekly #003

Corrected component costs flow into finished products

For AVCO and FIFO, later corrections to consumed component values now update the value of finished products from completed manufacturing orders. Valuation inputs on completed orders can no longer be edited in the UI.

Versions20.0
ModulesWMS Accounting stock_account
AppInventory & Manufacturing

Pull requests and commits

BranchPull requestCommit
20.0odoo/odoo#291813 ↗12a3fd1185 ↗

Commit message

[IMP] mrp*, stock_account: propagate corrected component values

Finished AVCO and FIFO products kept the value calculated when their
manufacturing order was completed. Later corrections to consumed
component values therefore did not update the finished product.

Compute production values dynamically and propagate stock valuation
replays through completed manufacturing orders while preventing users
from editing valuation inputs on completed orders through the UI.

This commit's changes:
- Compute finished values from component, operation, and extra costs
  directly in `_get_value_from_production`.
- Remove the MRP `_cal_price` implementation and its reliance on the
  stored `price_unit`.
- Return outgoing moves changed by AVCO and FIFO valuation replays and
  revalue the completed productions that consumed them.
- Keep quantities, components, by-products, and work-order time data
  readonly in completed manufacturing orders, even when unlocked.
- Adapt subcontracting purchase and dropshipping valuation to dynamic
  production values and partial quantities.

task-6361515


Related: odoo/enterprise#133811

My stack

Pick the versions and apps you run. Weekly digests, this week's table and All changes then show only what concerns you. Saved in this browser.

Versions
Apps
Modules