Skip to content
Health
60/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 1 month ago
  • Required by5/25
    0 modules depend on it
  • Maturity5/25
    In 1 Odoo series since 17.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.15 MB
Module directory on disk
Code analysis 1 migration note 4 models 5 views 0 HTTP endpoints

Description

This module extends the stock and analytic accounting capabilities by automatically creating analytic lines from stock based on configurable rules.

Key features:

  • Define stock movement rules by source and destination locations.
  • Compute analytic line amounts using either:
    • Product list price.
    • Category-based formula: (avg_price * (avg_weight * qty)) + ((avg_weight * qty) * supplement)
  • Support for positive and negative analytic distributions.
  • Handles partial distributions and multi-account combinations.
  • Supports return pickings and reversal analytic lines.
  • Fully compatible with analytic plans and multidimensional analytic accounting.

The module is useful for organizations needing precise analytic accounting for inventory movements, such as manufacturing, logistics, or services.

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 5

XML IDNameModelTypeStatus
product_category_form_inherit product.category.form.inherit product.category form Inherits product.product_category_form_view
view_account_analytic_line_form_inherit view.account.analytic.line.form.inherit account.analytic.line form Inherits analytic.view_account_analytic_line_form
view_stock_analytic_rule_form stock.analytic.rule.form stock.analytic.rule form New
view_stock_analytic_rule_search stock.analytic.rule.search stock.analytic.rule search New
view_stock_analytic_rule_tree stock.analytic.rule.tree stock.analytic.rule tree New

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 4

New fields (1)
  • stock_move_id Many2one → stock.move
    ondelete='cascade' string='Stock Move' args: 'stock.move'
Public methods (0)

No public methods.

New fields (6)
  • avg_price Float
    digits=(16, 2) help='This field is used to store the average price of the products' string='Average Price'
  • avg_price_for_internal_moves Float
    digits=(16, 2) help='This field is used to store the average price of\n the products for internal moves' string='Average Price for Internal Moves'
  • avg_weight Float
    digits=(16, 2) help='This field is used to store the average weight of the products' string='Average Weight'
  • avg_weight_for_internal_moves Float
    digits=(16, 2) help='This field is used to store the average weight of\n the products for internal moves' string='Average Weight for Internal Moves'
  • custom_computation_for_internal_moves Boolean
    help='If checked, the average price and weight for\n internal moves will be used instead of the standard ones' string='Custom Computation for Internal Moves'
  • supplement Float
    digits=(16, 2) help='This field is used to supplement the cost of the product'
Public methods (0)

No public methods.

New fields (11)
  • active Boolean
    default=True
  • amount_compute_type Selection
    default='category' help="\n Category: The amount is computed based on the product's\n category avg price, avg weight, and supplement.\n Product: The amount is computed based on the product's price.\n " required=True string='Compute amount by' args: [('category', _('Category')), ('product', _('Product'))]
  • analytic_distribution_negative Json
    compute='_compute_analytic_distribution' copy=True readonly=False store=True args: 'Negative Analytic Distribution'
  • applicable_category_ids Many2many → product.category
    column1='rule_id' column2='category_id' comodel_name='product.category' help='If set, the rule will only be applied to products of these categories.' relation='stock_analytic_rule_category_rel' string='Applicable Categories'
  • company_id Many2one → res.company
    default=<expr> required=True args: 'res.company'
  • financial_account_id Many2one → account.account
    domain=[('deprecated', '=', False)] help='Financial account to use for the analytic lines.' string='Financial Account' args: 'account.account'
  • include_taxes Boolean
    default=False help='If checked, the amount will include taxes when computed by product.'
  • location_dest_ids Many2many → stock.location
    string='To' args: 'stock.location', 'stock_analytic_model_location_dest_rel', 'model_id', 'location_id'
  • location_from_ids Many2many → stock.location
    string='From' args: 'stock.location', 'stock_analytic_model_location_from_rel', 'model_id', 'location_id'
  • mandatory Boolean
    help="If checked, couldn't validate a stock move if it doesn't generate analytic lines."
  • name Char
Public methods (4)
  • action_open_form(self)
  • copy(self, default=None)
  • generate_analytic_lines(self, stock_move)
    @api.model
    Generates analytic lines based on matching stock analytic rules.
  • write(self, vals)

New fields (0)

No new fields.

Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)