Stock Move Valuation Usage
stock_move_valuation_usage · OCA/stock-logistics-workflow
stock_valuation_layer_usage (19.0)-
Security25/25No findings
-
Activity25/25Human commit this month
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 19.0
Heuristic over the facts below, not an audit · How it's computed
Description
This module allows to trace the usage of stock move valuation. That is, makes it possible to identify which stock moves were used as sources for a given outgoing stock move, and how much quantity and value was taken from each source move.
Note: In Odoo 19.0, stock valuation layer model was removed and valuation is now tracked directly on stock moves through the 'value' field.
This kind of traceability is important in case that at some point you want to conduct a 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 move values are calculated in order to respect the MTO case. When creating the outgoing move valuation, Odoo uses FIFO to consume from the first available incoming moves with value. The module stock_move_valuation_usage improves this process. For standard FIFO, it always uses the oldest move. However, for MTO cases, when there is a fixed link between the incoming move and the outgoing move, the system should use the specific incoming move not just the oldest one. Also, when the case is not MTO, the system should avoid using moves that are "reserved".
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 5
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
stock_move_valuation_usage_form |
stock.move.valuation.usage.form | stock.move.valuation.usage | form | New |
stock_move_valuation_usage_list |
stock.move.valuation.usage.list | stock.move.valuation.usage | list | New |
stock_move_valuation_usage_pivot |
stock.move.valuation.usage.pivot | stock.move.valuation.usage | pivot | New |
stock_move_valuation_usage_search |
stock.move.valuation.usage.search | stock.move.valuation.usage | search | New |
view_move_form_inherit |
stock.move.form.inherit | stock.move | form | Inherits stock.view_move_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
No new fields.
Public methods (0)No public methods.
-
incoming_usage_idsOne2many → stock.move.valuation.usagecomodel_name='stock.move.valuation.usage'help="Trace in what stock moves has this move's valuation been used, including the quantities and values taken."inverse_name='dest_stock_move_id'string='Incoming Valuation Usage' -
incoming_usage_quantityFloatcompute='_compute_incoming_usages'store=Truestring='Incoming Usage quantity' -
incoming_usage_valueFloatcompute='_compute_incoming_usages'store=Truestring='Incoming Usage value' -
usage_idsOne2many → stock.move.valuation.usagecomodel_name='stock.move.valuation.usage'help="Trace in what stock moves has this move's valuation been used, including the quantities and values taken."inverse_name='src_stock_move_id'string='Valuation Usage' -
usage_quantityFloatcompute='_compute_usage_values'store=True -
usage_valueFloatcompute='_compute_usage_values'store=True
No public methods.
-
company_idMany2one → res.companyreadonly=Truerequired=True args: 'res.company' -
dest_stock_move_idMany2one → stock.movecomodel_name='stock.move'help='Outgoing stock move that consumed from the source move'required=Falsestring='Destination Stock Move' -
product_idMany2one → product.productcomodel_name='product.product'related='dest_stock_move_id.product_id'store=True -
quantityFloatstring='Taken Quantity' -
src_stock_move_idMany2one → stock.movecomodel_name='stock.move'help='Incoming stock move that was used as a source for valuation'string='Source Stock Move' -
valueFloatstring='Taken Value'
-
init(self)
Loading…