Stock Period Evaluation
stock_period_evaluation · OCA/l10n-italy
-
Security25/25No findings
-
Activity25/25Human commit this month
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 18.0
Heuristic over the facts below, not an audit · How it's computed
Description
Stock Period Evaluation is a comprehensive warehouse management module that provides period-end stock valuation and inventory closing capabilities for Odoo.
Overview
This module enables businesses to create accurate snapshots of their inventory valuation at specific dates without disrupting daily warehouse operations. It's particularly valuable for companies that need periodic financial reporting, inventory audits, or cost analysis.
Key Features
- Flexible Valuation Methods: Calculate inventory value using
multiple approaches:
- Standard cost from product master data
- Purchase average cost based on historical purchases
- Category-based costing using product category settings
- FIFO (First In, First Out) valuation method
- LIFO (Last In, First Out) valuation method
- Manual cost override capabilities
- Date-Based Inventory Snapshots:
- Create valuations at any specific closing date
- Track inventory changes between closing periods
- Link consecutive periods for incremental analysis
- Advanced Inventory Management:
- Location-specific stock tracking
- Lot/serial number support
- Owner-based stock segregation (consignment)
- Multi-currency purchase price conversion
- Comprehensive Reporting:
- Excel (XLSX) export with detailed product information
- Customizable report columns (location, lot, owner)
- Automatic value calculations and totals
- Print wizard for filtered data export
- Bulk Data Import:
- CSV import functionality for mass inventory updates
- Support for European decimal formats
- Automatic product validation
- Performance Optimization:
- Optional archiving of processed stock moves
- Efficient calculation algorithms for large datasets
- Bypass options for negative quantities
Business Benefits
- Accurate period-end financial reporting without stock freezing
- Historical inventory valuation tracking for audits
- Comparison of different costing methods
- Support for multi-location and multi-company operations
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 7
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
stock_close_import_wizard |
Import stock close csv | stock.close.import.wizard | form | New |
stock_close_print_wizard |
Stock Close Print | stock.close.print.wizard | form | New |
stock_period_evaluation_form |
stock.close.period.form | stock.close.period | form | New |
stock_period_evaluation_line_form |
stock.close.period.line.form | stock.close.period.line | form | New |
stock_period_evaluation_line_search |
stock.close.period.line.search | stock.close.period.line | search | New |
stock_period_evaluation_line_tree |
stock.close.period.line.tree | stock.close.period.line | list | New |
stock_period_evaluation_tree |
stock.close.period.tree | stock.close.period | list | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 8
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (1)-
generate_xlsx_report(self, workbook, data, lines)
-
close_idMany2one → stock.close.periodstring='Stock Period Evaluation' args: 'stock.close.period' -
fileBinary
-
import_csv(self) -
load_products(self, lines)
-
amountFloatcopy=Falsereadonly=Truestring='Stock Amount Value' -
bypass_negative_qtyBooleanhelp='Ignore lines with negative quantity.'string='Bypass Negative Quantity' -
close_dateDatedefault=fields.Date.context_todayhelp='The date that will be used for the store the product quantity and average cost.'readonly=Falserequired=True -
company_idMany2one → res.companydefault=<expr>string='Company' args: 'res.company' -
force_evaluation_methodSelectioncopy=Falsedefault='no_force'help='Force Evaluation method will be used only for compute purchase costs.' args: [('no_force', 'Category setup'), ('purchase', 'Purchase average cost'), ('standard', 'Cost in product'), ('fifo', 'FIFO'), ('lifo', ' LIFO (continuous)')] -
last_close_dateDatecompute='_compute_last_close_date'store=True -
last_closed_idMany2one → stock.close.periodcopy=Falsereadonly=Falsestring='Last Closed' args: 'stock.close.period' -
line_idsOne2many → stock.close.period.linecopy=Truereadonly=Falsestring='Product' args: 'stock.close.period.line', 'close_id' -
nameCharreadonly=Falserequired=Truestring='Reference' -
no_recompute_linesBooleanstring='Do not recompute lines' -
purchase_okBooleandefault=Falsehelp="Marks if action 'Compute Purchase' is processed."readonly=True -
stateSelectioncopy=Falsedefault='draft'index=Truereadonly=Truestring='Status' args: [('draft', 'Draft'), ('confirm', 'In Progress'), ('done', 'Validated'), ('cancel', 'Cancelled')] -
work_end_dateDatetimereadonly=True -
work_start_dateDatetimedefault=fields.Datetime.nowreadonly=True
-
action_cancel(self) -
action_done(self) -
action_force_done(self) -
action_recalculate_purchase(self) -
action_recompute_amount(self) -
action_set_to_draft(self) -
action_start(self) -
unlink(self)
-
amount_lineFloatcompute='_compute_amount_line'digits='Product Price'store=Truestring='Current Inventory Amount' -
categ_nameCharreadonly=Truerelated='product_id.categ_id.complete_name'store=Truestring='Category Name' -
close_idMany2one → stock.close.periodindex=Trueondelete='cascade'string='Stock Period Evaluation' args: 'stock.close.period' -
company_idMany2one → res.companyrelated='close_id.company_id'store=Truestring='Company' args: 'res.company' -
cumulative_amountFloatdigits='Product Price' -
cumulative_landed_costFloatdigits='Product Price' -
cumulative_qtyFloatdigits='Product Unit of Measure'help='Purchased quantity for evaluation purposes'string='Cumulative Quantity' -
evaluation_detailsText -
evaluation_methodSelectioncopy=False args: [('purchase', 'Purchase'), ('standard', 'Standard'), ('manual', 'Manual')] -
inventory_amountFloatdigits='Product Price'string='Last Inventory Amount' -
inventory_qtyFloatdigits='Product Unit of Measure'string='Last Inventory Quantity' -
location_idMany2one → stock.locationstring='Location' args: 'stock.location' -
lot_idMany2one → stock.lotstring='Lot/Serial Number' args: 'stock.lot' -
owner_idMany2one → res.partnerstring='Owner' args: 'res.partner' -
price_unitFloatdigits='Product Price'string='End Average Price' -
product_codeCharreadonly=Truerelated='product_id.default_code'store=True -
product_idMany2one → product.productdomain=[('type', '=', 'consu'), ('is_storable', '=', True)]index=Truerequired=Truestring='Product' args: 'product.product' -
product_nameCharcompute='_compute_product_name'readonly=Truestore=True -
product_qtyFloatdigits='Product Unit of Measure'string='Quantity at Current Inventory Date' -
product_uom_idMany2one → uom.uomdefault=<expr>required=Truestring='UOM' args: 'uom.uom'
No public methods.
-
close_period_idMany2one → stock.close.periodstring='Close Period' args: 'stock.close.period'
-
generate_report(self)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (3)-
price_calculation(self, line, valuation_type, start_qty, start_price)@api.modelAssign the quantity of the closing line to the moves of the period. The move lines are searched between the last close date and the close date, for the FIFO method only the incoming ones, otherwise the incoming and outgoing ones. They are sorted from the newest day to the oldest one, and in the same day the incoming move lines come after the other ones, as if they were done before them. :return: the tuples of `_get_tuples` -
recompute_average_cost_period_purchase(self, closing_id) -
update_tuple(qty_to_be_evaluated, product_qty, tuples, ml, price_unit, qty_from, qty_at_date, valuation_type)@staticmethodAssign part of the quantity to be evaluated to the move line `ml`. The tuple of the assigned quantity is appended to `tuples`. :param qty_to_be_evaluated: quantity not assigned yet :param product_qty: quantity of the move line, in product UoM :param qty_at_date: stock before the moves already processed (LIFO only) :return: the quantity still to be evaluated, True if it is all assigned, and the stock before the move line