| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 66 |
| Technical Name |
analytic_distribution_team |
| License | LGPL-3 |
| Website | https://lunemakers.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
| Lines of code | 66 |
| Technical Name |
analytic_distribution_team |
| License | LGPL-3 |
| Website | https://lunemakers.com |
Analytic Distribution by Sales Team
Route analytic accounts automatically based on which sales team owns a quotation or invoice. One small criterion, a whole new dimension of reporting.
Overview
One missing criterion. Now it's there.
Out of the box, Odoo's analytic distribution rules can be triggered by partner, partner category, product, product category, account prefix, and company. This module adds Sales Team to that list — without changing how anything else behaves.
Configure a rule once, and every sale order or customer invoice belonging to that team will get its analytic accounts assigned automatically. No manual entry, no journal-line scripts, no maintenance.
Use cases
Built for real-world structures
Multi-brand companies
Each brand is a separate sales team. Tag every sale and invoice to the right brand's analytic account, automatically.
Marketplaces
Amazon, eBay, Cdiscount, BUT, Vente-Unique… one team per channel, one analytic account per team, clean P&L per marketplace.
Geographic divisions
Different sales teams per country or region. Each one routed to its own analytic dimension for cross-border reporting.
How to use it
Three steps. That's all.
|
1
|
Open an Analytic Distribution ModelGo to |
|
2
|
Set the Sales TeamA new field Sales Team appears alongside the existing criteria. Pick the team this rule should apply to. |
|
3
|
Configure the distributionSet the analytic accounts and percentages as usual. From now on, any sale or invoice belonging to that team will pick up the distribution automatically. |
Behaviour
Predictable. No surprises.
Rules with a sales team only apply where it makes sense. The module is silent on documents that have no team concept.
| Document | Rule has team? | Document has team? | Applied? |
|---|---|---|---|
| Sale order / Invoice | No | — | Yes (unchanged) |
| Sale order / Invoice | Yes | Same team | Yes |
| Sale order / Invoice | Yes | Different / none | No |
| Purchase, Expense, … | Yes | — | No |
Under the hood
Light, surgical, upgrade-friendly
Adds a single team_id field on account.analytic.distribution.model. Uses Odoo's native matching engine — no parallel logic, no shadow rules.
On the invoice side, the official core hook _get_analytic_distribution_arguments is extended. On the sale side, the compute method is reimplemented to inject the team into the matcher (core does not expose a hook there).
Depends on account and sale. LGPL-3 licensed.
Please log in to comment on this module