Skip to content
Health
67/100
fair
  • Security25/25
    No findings
  • Activity12/25
    Last human commit 18 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity25/25
    In 6 Odoo series since 13.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.1 MB
Module directory on disk
Code analysis 0 migration notes 3 models 6 views 0 HTTP endpoints

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".

Dependencies

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 6

XML IDNameModelTypeStatus
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_ids One2many → stock.valuation.layer.usage
    comodel_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'
Public methods (0)

No public methods.

New fields (6)
  • incoming_usage_ids One2many → stock.valuation.layer.usage
    comodel_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_quantity Float
    compute='_compute_incoming_usages' store=True string='Incoming Usage quantity'
  • incoming_usage_value Float
    compute='_compute_incoming_usages' store=True string='Incoming Usage value'
  • usage_ids One2many → stock.valuation.layer.usage
    comodel_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_quantity Float
    compute='_compute_usage_values' store=True
  • usage_value Float
    compute='_compute_usage_values' store=True
Public methods (2)
  • create(self, values)
    @api.model_create_multi
  • write(self, values)

New fields (7)
  • company_id Many2one → res.company
    readonly=True required=True args: 'res.company', 'Company'
  • dest_stock_valuation_layer_id Many2one → stock.valuation.layer
    comodel_name='stock.valuation.layer' help='Valuation Layer that was used' required=False string='Destination Stock Valuation Layer'
  • product_id Many2one → product.product
    comodel_name='product.product' related='stock_valuation_layer_id.product_id' store=True
  • quantity Float
    string='Taken Quantity'
  • stock_move_id Many2one → stock.move
    comodel_name='stock.move' help='Stock move that took the quantities and value from the layer' string='Stock Move'
  • stock_valuation_layer_id Many2one → stock.valuation.layer
    comodel_name='stock.valuation.layer' help='Valuation Layer that was used' required=True string='Stock Valuation Layer'
  • value Float
    string='Taken Value'
Public methods (1)
  • init(self)

Loading…

Loading…

Loading…

Loading…

Loading…