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.
auto_awesome What this module does
AI-generated from the code · Odoo 17.0Create rules that automatically generate analytic accounting entries when stock moves are completed, based on source and destination locations. Amounts can be computed from product prices or product category averages.
This module lets you define Stock Analytic Rules that link stock movements to analytic accounting. Each rule specifies a source location and a destination location; when a stock move is completed between those locations, analytic lines are created automatically.
- Rules are managed under Accounting > Configuration > Stock Analytic > Stock Analytic Rules.
- For each rule you choose how the amount is computed: by Product (using the product's sales price, optionally including taxes) or by Category (using the category's average price, average weight and supplement).
- You can set a positive and a negative analytic distribution, so amounts can be split across several analytic accounts, and returns/reversals generate lines with the opposite sign.
- Product categories gain three new fields: Average Price, Average Weight and Supplement, used by the category-based calculation.
- Analytic lines created this way show a link to the related stock move.
- The system prevents creating two rules with the same combination of source and destination locations, and rules are filtered by company.
- If a category-based rule is used but the category has no weight or price greater than zero, an error is raised and no lines are created.
Depends on
Menus it adds
Models and fields (4)
- stock.move · extends an existing model
- product.category · extends an existing modelavg_price (Average Price), avg_weight (Average Weight), supplement
- stock.analytic.rule · new modelname, active, company_id, include_taxes, location_dest_ids (To), location_from_ids (From), amount_compute_type (Compute amount by), financial_account_id (Financial Account), analytic_distribution_negative (Negative Analytic Distribution)
- account.analytic.line · extends an existing modelstock_move_id (Stock Move)
Text generated by AI (DeepSeek) from reading the Odoo 17.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 17.0
Confirmed on 2026-11-03 in branch 17.0 of OCA/account-analytic.
terminal Installation and usage
OCA documentation · Odoo 17.0Usage
Source · Odoo 17.0- Configure Product Categories
Navigate to Inventory > Configuration > Product Categories.
For each relevant product category, configure the following fields:
Average Price: Base cost per unit.Average Weight: Used to scale the cost relative to quantity.Supplement: Additional surcharge applied on top of base cost.
These values are used when the compute type is set to Category.
---
- Define Analytic Accounts and Plans
Navigate to Accounting > Configuration > Analytic Accounting.
- Create one or more Analytic Plans.
- Create Analytic Accounts linked to these plans.
These accounts will be referenced in the analytic distribution logic of each model.
---
- Create Stock Analytic Rules
Navigate to Accounting > Configuration > Stock Analytic Rules.
Configure each rule with:
Name: Used as the label for the generated analytic lines.Source LocationsandDestination Locations: Determines when the model applies.Amount Compute Type: Choose between:- Product – uses the product's list price.
- Category – uses the category's formula
(avg_price × weight × qty) + (weight × qty × supplement). Analytic Distribution(for positive lines)Negative Analytic Distribution(for negative lines)Financial Account: Used in the generated analytic line.
📌 Note: The distribution for reversed moves (e.g. returns) is automatically computed by inverting the accounts — no need to define a separate rule.
- Perform a Stock Move
Create a Transfer that matches the configured rule:
- It can be internal, delivery, or receipt.
- Ensure the source and destination locations match the analytic rule.
- Review Analytic Lines
Navigate to Accounting > Accounting > Analytic Lines.
You should now see the automatically generated analytic lines reflecting the cost and distribution defined in your model.
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.