Skip to content
Health
60/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Human commit this month
  • Required by5/25
    0 modules depend on it
  • Maturity5/25
    In 1 Odoo series since 18.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.21 MB
Module directory on disk
Code analysis 0 migration notes 8 models 7 views 0 HTTP endpoints

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

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 7

XML IDNameModelTypeStatus
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

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • generate_xlsx_report(self, workbook, data, lines)

New fields (2)
  • close_id Many2one → stock.close.period
    string='Stock Period Evaluation' args: 'stock.close.period'
  • file Binary
Public methods (2)
  • import_csv(self)
  • load_products(self, lines)

New fields (14)
  • amount Float
    copy=False readonly=True string='Stock Amount Value'
  • bypass_negative_qty Boolean
    help='Ignore lines with negative quantity.' string='Bypass Negative Quantity'
  • close_date Date
    default=fields.Date.context_today help='The date that will be used for the store the product quantity and average cost.' readonly=False required=True
  • company_id Many2one → res.company
    default=<expr> string='Company' args: 'res.company'
  • force_evaluation_method Selection
    copy=False default='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_date Date
    compute='_compute_last_close_date' store=True
  • last_closed_id Many2one → stock.close.period
    copy=False readonly=False string='Last Closed' args: 'stock.close.period'
  • line_ids One2many → stock.close.period.line
    copy=True readonly=False string='Product' args: 'stock.close.period.line', 'close_id'
  • name Char
    readonly=False required=True string='Reference'
  • no_recompute_lines Boolean
    string='Do not recompute lines'
  • purchase_ok Boolean
    default=False help="Marks if action 'Compute Purchase' is processed." readonly=True
  • state Selection
    copy=False default='draft' index=True readonly=True string='Status' args: [('draft', 'Draft'), ('confirm', 'In Progress'), ('done', 'Validated'), ('cancel', 'Cancelled')]
  • work_end_date Datetime
    readonly=True
  • work_start_date Datetime
    default=fields.Datetime.now readonly=True
Public methods (8)
  • 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)

New fields (20)
  • amount_line Float
    compute='_compute_amount_line' digits='Product Price' store=True string='Current Inventory Amount'
  • categ_name Char
    readonly=True related='product_id.categ_id.complete_name' store=True string='Category Name'
  • close_id Many2one → stock.close.period
    index=True ondelete='cascade' string='Stock Period Evaluation' args: 'stock.close.period'
  • company_id Many2one → res.company
    related='close_id.company_id' store=True string='Company' args: 'res.company'
  • cumulative_amount Float
    digits='Product Price'
  • cumulative_landed_cost Float
    digits='Product Price'
  • cumulative_qty Float
    digits='Product Unit of Measure' help='Purchased quantity for evaluation purposes' string='Cumulative Quantity'
  • evaluation_details Text
  • evaluation_method Selection
    copy=False args: [('purchase', 'Purchase'), ('standard', 'Standard'), ('manual', 'Manual')]
  • inventory_amount Float
    digits='Product Price' string='Last Inventory Amount'
  • inventory_qty Float
    digits='Product Unit of Measure' string='Last Inventory Quantity'
  • location_id Many2one → stock.location
    string='Location' args: 'stock.location'
  • lot_id Many2one → stock.lot
    string='Lot/Serial Number' args: 'stock.lot'
  • owner_id Many2one → res.partner
    string='Owner' args: 'res.partner'
  • price_unit Float
    digits='Product Price' string='End Average Price'
  • product_code Char
    readonly=True related='product_id.default_code' store=True
  • product_id Many2one → product.product
    domain=[('type', '=', 'consu'), ('is_storable', '=', True)] index=True required=True string='Product' args: 'product.product'
  • product_name Char
    compute='_compute_product_name' readonly=True store=True
  • product_qty Float
    digits='Product Unit of Measure' string='Quantity at Current Inventory Date'
  • product_uom_id Many2one → uom.uom
    default=<expr> required=True string='UOM' args: 'uom.uom'
Public methods (0)

No public methods.

New fields (1)
  • close_period_id Many2one → stock.close.period
    string='Close Period' args: 'stock.close.period'
Public methods (1)
  • generate_report(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • price_calculation(self, line, valuation_type, start_qty, start_price)
    @api.model
    Assign 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)
    @staticmethod
    Assign 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