TIP: You can type at any time to perform a new search.
Stock Valuation Layer Usage
stock_valuation_layer_usage · OCA/stock-logistics-workflow
Security findings
- Repository
- OCA/stock-logistics-workflow · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Warehouse Management
- Folder size
- 0.1 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/stock-logistics-workflow
- Last tracking update
- 2026-10-03 23:56:57
- Authors
- Odoo Community Association (OCA), ForgeFlow
- Maintainers
- Odoo Community Association (OCA), ForgeFlow
- Committers
- Weblate, OCA-git-bot, oca-ci, JasminSForgeFlow
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
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".
Code Analysis
Views touched (6)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
stock_valuation_layer_form |
stock.valuation.layer.form | stock.valuation.layer | form | Inherits stock_account.stock_valuation_layer_form |
stock_valuation_layer_usage_form |
stock.valuation.layer.usage.form | stock.valuation.layer.usage | form | New |
stock_valuation_layer_usage_list |
stock.valuation.layer.usage.list | stock.valuation.layer.usage | list | New |
stock_valuation_layer_usage_pivot |
stock.valuation.layer.usage.pivot | stock.valuation.layer.usage | pivot | New |
stock_valuation_layer_usage_search |
stock.valuation.layer.usage.search | stock.valuation.layer.usage | search | New |
view_move_form_inherit |
stock.move.form.inherit | stock.move | form | Inherits stock_account.view_move_form_inherit |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (3)
New fields (1)
-
layer_usage_idsOne2many → stock.valuation.layer.usagecomodel_name='stock.valuation.layer.usage'help='Trace what valuation layers have been used by this move, including the quantities taken.'inverse_name='stock_move_id'string='Valuation Layer Usage'
No public methods.
New fields (6)
-
incoming_usage_idsOne2many → stock.valuation.layer.usagecomodel_name='stock.valuation.layer.usage'help='Trace on what stock moves has the stock valuation been used in, including the quantities taken.'inverse_name='dest_stock_valuation_layer_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.valuation.layer.usagecomodel_name='stock.valuation.layer.usage'help='Trace on what stock moves has the stock valuation been used in, including the quantities taken.'inverse_name='stock_valuation_layer_id'string='Valuation Usage' -
usage_quantityFloatcompute='_compute_usage_values'store=True -
usage_valueFloatcompute='_compute_usage_values'store=True
-
create(self, values)@api.model_create_multi -
write(self, values)
New fields (7)
-
company_idMany2one → res.companyreadonly=Truerequired=True args: 'res.company', 'Company' -
dest_stock_valuation_layer_idMany2one → stock.valuation.layercomodel_name='stock.valuation.layer'help='Valuation Layer that was used'required=Falsestring='Destination Stock Valuation Layer' -
product_idMany2one → product.productcomodel_name='product.product'related='stock_valuation_layer_id.product_id'store=True -
quantityFloatstring='Taken Quantity' -
stock_move_idMany2one → stock.movecomodel_name='stock.move'help='Stock move that took the quantities and value from the layer'string='Stock Move' -
stock_valuation_layer_idMany2one → stock.valuation.layercomodel_name='stock.valuation.layer'help='Valuation Layer that was used'required=Truestring='Stock Valuation Layer' -
valueFloatstring='Taken Value'
-
init(self)
Loading…
Loading…
Loading…
Loading…
Loading…