OdooWiki OCA HUB

Stock Valuation Layer Usage

stock_valuation_layer_usage folder_open OCA/stock-logistics-workflow open_in_new
Warehouse Management License: AGPL-3

This module allows to trace the usage of stock valuation layer. That is, makes it possible to identify in what stock moves was a given valuation layer used, and how much quantity was taken by the particular stock move.

This kind of traceability is important in case that at some point you want to conduct an revaluation (for example, in case that the purchase order price changes after the products have been received into stock).

Also, it changes the way the outgoing layers are created in order to respect the MTO case. When creating the out svl, Odoo takes the first layer available with value. The module stock_valuation_layer_usage arises an issue with that Odoo process. Odoo will take always the oldest svl. However, that is not the case for MTO. When there is a fixed link between the incoming move and the outgoing move, at the time of creating the outgoing svl the system should take the specific incoming svl not just the oldest one. Also, when the case is not MTO, the system should avoid using svl that are "reserved".

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Traces which stock valuation layers were consumed by which stock moves, showing the quantity and value taken. Adds a report and tabs on valuation layers and stock moves so you can see where costs went.

This module records the link between a valuation layer that is consumed and the stock move that consumed it, storing the quantity and value taken. Each record is a 'Stock Valuation Layer Usage'.

Where you see it: - A new report menu under Warehouse reporting, with list, form and pivot views (the pivot groups by product and sums quantity and value). - On the stock valuation layer form, two new tabs: 'Usage' (where this layer was used) and 'Incoming Usage' (where it came from). - On the stock move form, a 'Valuation Layers' group listing the layers used, visible to accounting users.

Automatic behaviour: - When an outgoing valuation layer is created, the system walks back through the move's origin moves, finds the earlier outgoing layers, and records how much quantity and value was taken from each, respecting the MTO link instead of always taking the oldest layer. - For dropshipped moves, a usage record is created linking the incoming layer to the outgoing layer. - Totals of used quantity and value are computed and stored on the valuation layer.

Business rules: - The same layer cannot be both origin and destination; a validation error blocks it. - Records are company-specific: users only see usages of their allowed companies.

It touches stock.move, stock.valuation.layer and the new stock.valuation.layer.usage model.

Menus it adds

stock_valuation_layer_usage_menu
Models and fields (3)
  • stock.move · extends an existing modellayer_usage_ids (Valuation Layer Usage)
  • stock.valuation.layer · extends an existing modelusage_ids (Valuation Usage), usage_value, usage_quantity, incoming_usage_ids (Incoming Valuation Usage), incoming_usage_value (Incoming Usage value), incoming_usage_quantity (Incoming Usage quantity)
  • stock.valuation.layer.usage · new modelvalue (Taken Value), quantity (Taken Quantity), company_id, product_id, stock_move_id (Stock Move), stock_valuation_layer_id (Stock Valuation Layer), dest_stock_valuation_layer_id (Destination Stock Valuation Layer)

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 6 confirmed, 3 with no information of 9 versions.

Sources · Odoo 15.0

Confirmed on 2026-11-03 in branch 15.0 of OCA/stock-logistics-workflow.

terminal Installation and usage

OCA documentation · Odoo 18.0

This module depends on the OCA module 'stock_account_product_run_fifo_hook', available in the same OCA repository .

  • Create a product with that uses a category with automatic inventory valuation and FIFO costing method.
  • Create a purchase order for this product and receive it into stock.
  • Deliver the product to a customer and check the completed stock move in 'Inventory / Reporting / Stock Moves'. You will see a section 'Valuation Layers' where you will be able to identify the valuation layers that were used to value this move, and the quantity and value that was taken.
  • Create several MTO order
  • Deliver the products to a customer in a random way and check the section 'Valuation Layers Usage'. The MTO logic is respected, then FIFO applies.

No verified information in OCA: Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.