Adds distribution rules for stock moves to automatically create analytic lines
Project description
Stock Analytic Rule
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.
Table of contents
Usage
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 Locations and Destination 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.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
APSL - Nagarro <https://apsl.tech>
Bernat Obrador
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainer:
This module is part of the OCA/account-analytic project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odoo_addon_stock_analytic_rule-17.0.1.0.0.2-py3-none-any.whl.
File metadata
- Download URL: odoo_addon_stock_analytic_rule-17.0.1.0.0.2-py3-none-any.whl
- Upload date:
- Size: 43.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5be2d6be599c45e8ea12b5ff1533b1cbc1662d79b54e8885d9eb2157079ac6fb
|
|
| MD5 |
f536b50e38b52e29f1b6c831f2799574
|
|
| BLAKE2b-256 |
183829b061c5624f9623d3b82843839567fe15994e7e4abc6826997adaf723ab
|