Technical
Odoo Analytic Accounting: Plans, Distribution Models and Project Profitability
How to set up analytic plans and accounts in Odoo, split costs across projects and departments with distribution models, and read the analytic report to see profitability by project.
Kalvyai Engineering · · 9 min read

On this page
Your general ledger tells you that the company spent money on rent, salaries and software. It does not tell you which project or department that money was spent for. Analytic accounting adds that second view to Odoo without changing your chart of accounts.
This post covers how analytic plans and accounts fit together, how to split one cost across several projects or departments, how distribution models fill those splits in for you, and how to read the result as profitability by project.
Menus and field names move between Odoo versions. This guide follows the structure used in Odoo 17 and later. Where a path depends on your version or edition, it is marked for you to confirm.
What analytic accounting does and does not do
Analytic accounting is a parallel layer on top of your journal entries.
- It does not post anything to the general ledger. Your balance sheet and P&L stay exactly the same.
- It does create analytic items (one per analytic account a line is linked to) that carry an amount, a date and a reference back to the journal item.
- Revenue lines produce positive analytic amounts. Expense lines produce negative analytic amounts.
So if a vendor bill line of 1,000 is tagged 60% to Project A and 40% to Project B, the ledger still shows one expense of 1,000. The analytic layer shows -600 on Project A and -400 on Project B.
Step 1: Turn on analytic accounting
- Go to Accounting > Configuration > Settings.
- In the analytics section, enable Analytic Accounting.
- Save.
The user also needs the analytic accounting access right. If the analytic fields do not appear on bills, check the user's access rights under Settings > Users.
Step 2: Design your analytic plans
A plan is a dimension you want to report on. An analytic account is a value inside that dimension.
A typical service company might use:
Plan | Analytic accounts |
|---|---|
Projects | Website Rebuild - Client X, ERP Rollout - Client Y, Internal R&D |
Departments | Sales, Delivery, Support, Admin |
Plans are managed under Accounting > Configuration > Analytic Plans.
Keep plans independent
Each plan should answer one question. "Which project?" is one plan. "Which department?" is another. Do not mix project and department accounts in the same plan, or you lose the ability to report on each separately.
Because plans are independent, a single journal line can carry a distribution in more than one plan. A consultant's travel bill can be 100% to Project X and 100% to the Delivery department at the same time.
Use sub-plans for hierarchy
Plans can have child plans. For example, a Departments plan with sub-plans for each region. Reports can then roll up to the parent plan. Keep the tree shallow; two levels is usually enough.
Set applicability rules
On each plan you can define where it applies and whether it is:
- Optional: users may fill it in.
- Mandatory: the document cannot be posted without a distribution for this plan.
- Unavailable: the plan is hidden for that document type.
Rules can target document types such as vendor bills, customer invoices or purchase orders, and can be narrowed by account prefix or product category.
A practical setup: make the Projects plan Mandatory on vendor bills for expense accounts that are always project-related (subcontractors, project travel), and leave it Optional everywhere else. This catches missing tags at the moment the bill is posted, instead of at month end.
Step 3: Create analytic accounts
Under Accounting > Configuration > Analytic Accounts, create one account per project, department or other value. For each account set:
- Name and an optional Reference code. Short codes make reports easier to read.
- Plan it belongs to.
- Customer (optional), useful for client projects.
- Company, if you run multiple companies and the account should be restricted to one.
If you use the Project app, each project can be linked to an analytic account. Timesheets logged on that project then create analytic items automatically, valued at the employee's cost.
Step 4: Split costs on a line
On invoice, bill, sales order and purchase order lines you will see an Analytic Distribution field. Clicking it opens a widget where you choose accounts per plan and enter percentages.
Example: a shared software subscription
A monthly tool subscription of 1,200 is used by two client projects and internal R&D.
- Open the vendor bill and the expense line.
- Click the Analytic Distribution field.
- Under the Projects plan, add:
- Website Rebuild - Client X: 50%
- ERP Rollout - Client Y: 30%
- Internal R&D: 20%
- Under the Departments plan, add Delivery: 100%.
- Confirm the bill.
Result: one ledger line of 1,200, and analytic items of -600, -360 and -240 on the three projects, plus -1,200 on Delivery.
Percentages do not have to total 100%
Odoo allows a plan's distribution on a line to be below 100%. The remainder simply has no analytic account in that plan. That is sometimes intended, but it is also the most common reason project totals do not match the ledger. If a plan is mandatory, Odoo checks that the distribution for that plan is complete before posting.
What the stored value looks like
Under the hood, the distribution is stored as JSON on the journal item, keyed by analytic account ID with a percentage as the value. If you integrate other systems with Odoo, you write the same structure. A minimal example using XML-RPC from Python:
import xmlrpc.client
url = "https://your-odoo.example.com"
db, user, key = "prod", "api@example.com", "API_KEY"
common = xmlrpc.client.ServerProxy(f"{url}/xmlrpc/2/common")
uid = common.authenticate(db, user, key, {})
models = xmlrpc.client.ServerProxy(f"{url}/xmlrpc/2/object")
# Analytic account IDs 12, 15 and 18 are example values
distribution = {"12": 50.0, "15": 30.0, "18": 20.0}
models.execute_kw(db, uid, key, "account.move.line", "write",
[[4521], {"analytic_distribution": distribution}])The exact key format can differ between versions, especially when a line carries accounts from several plans. Test on a draft bill and read the field back before running any bulk update.
Step 5: Let distribution models fill splits in
Typing percentages on every line does not scale. Analytic Distribution Models apply a distribution automatically when a line matches certain conditions. They live under Accounting > Configuration > Analytic Distribution Models.
A model has matching conditions and a distribution. Conditions include fields such as partner, partner category, product, product category, account prefix and company. When a new line matches, the distribution is pre-filled. Users can still change it before posting.
Example models
Condition | Distribution |
|---|---|
Partner = Office Landlord Ltd | Departments: Sales 25%, Delivery 50%, Support 15%, Admin 10% |
Product = Cloud Hosting - Client Y | Projects: ERP Rollout - Client Y 100% |
Account prefix = 6230 (travel) | Departments: Delivery 100% |
How to build them well
- Start from your largest recurring costs: rent, hosting, subcontractors, payroll-related bills.
- Use the most specific condition that is still stable. A product is more precise than a partner; a partner is more precise than an account prefix.
- When several models could match, Odoo picks the most specific one based on the conditions set. Avoid overlapping models with conflicting splits, because the result becomes hard to predict for users.
- Review the split ratios each quarter. A rent split based on headcount goes stale when teams grow.
Splitting shared costs across departments
Shared costs fall into three groups, and each is handled slightly differently.
Costs you can tag at entry
Rent, utilities, software and hosting arrive on vendor bills. Tag them with a distribution model and they are split the moment the bill is created.
Costs that arrive as one lump
Some costs, such as an annual insurance premium or an accrual, are posted in one journal entry. Add the distribution on the expense line of that entry. For costs you want spread differently at month end, a common pattern is a monthly reclassification entry: the same expense account debited and credited, with the credit line tagged to a "Shared costs" analytic account and the debit lines tagged to the departments. The ledger nets to zero, and the analytic layer moves the cost.
Labour
For service work, labour is usually the largest cost. If employees log timesheets on projects, Odoo creates analytic items valued at the employee's hourly cost. Make sure each employee has a cost set on their HR record, or labour will show as zero.
Reading the analytic report for project profitability
Once bills, invoices and timesheets carry analytic data, you have a few ways to read it.
The analytic report
Go to Accounting > Reporting > Analytic Report. It shows analytic accounts with their totals, and can be filtered by date and plan.
To read profitability by project:
- Filter on the Projects plan.
- Set the date range to the period you care about, or to all dates for lifetime profitability.
- Read each account's balance. Positive means revenue exceeded costs; negative means the project is losing money or has not been invoiced yet.
- Drill into an account to see the individual analytic items behind the number.
Analytic items in pivot view
The analytic items list (in the Accounting app's reporting or configuration menu, depending on your version) supports pivot and graph views. A useful pivot:
- Rows: analytic account (Projects plan)
- Columns: financial account, or month
- Measure: amount
This shows not just whether a project is profitable, but where the money went: subcontractors, travel, labour.
Project profitability inside the Project app
If projects are linked to analytic accounts, the project's update or overview panel shows a profitability section with revenue and cost categories such as timesheets, invoices and vendor bills. This is the view project managers usually check, while finance uses the analytic report.
Pulling numbers for your own reports
If you feed a BI tool or a spreadsheet, query analytic items grouped by account rather than journal items:
rows = models.execute_kw(db, uid, key, "account.analytic.line", "read_group",
[[("date", ">=", "2024-01-01"), ("date", "<=", "2024-12-31")],
["amount:sum"],
["account_id"]],
{"lazy": False})
for r in rows:
print(r["account_id"], round(r["amount"], 2))In recent versions, account_id holds the account for the first plan, and additional plans get their own fields on analytic items. Group by the field that matches the plan you want.
If you would rather see these numbers on a dashboard than in a pivot, Kalvyai InsightBoard is our Odoo dashboard builder for KPIs and charts, and can sit on top of analytic data.
Common mistakes
- Too many plans. Every plan is another field users must think about. Start with two and add more only when someone needs the report.
- Plans used as tags. If nobody reports on a dimension, it does not need a plan.
- No mandatory rules. Without them, untagged bills pile up and month-end becomes a cleanup exercise.
- Missing employee costs. Projects look highly profitable because labour is valued at zero.
- Changing distributions after the fact without a note. Edits to posted entries change history. Keep a short audit note on why a split was changed.
- Comparing analytic totals to the full P&L. Balance sheet lines, taxes and untagged costs do not appear in analytic reports, so totals will not match the P&L by design.
A short checklist
- Enable analytic accounting and grant access.
- Create one plan per reporting question.
- Create analytic accounts and link projects to them.
- Set mandatory rules where tags must never be missing.
- Add distribution models for recurring shared costs.
- Set employee hourly costs if you use timesheets.
- Review the analytic report monthly and fix untagged lines before closing.
How Kalvyai can help
We set up and extend analytic accounting in Odoo: plan design, distribution models, migrating historical data into analytic accounts, and integrations that write the correct analytic distribution from other systems. We also build reporting on top of it so project managers and finance read the same numbers. See our Odoo services, browse our apps at store.kalvyai.com, or contact us to talk through your setup.
- Odoo
- Analytic Accounting
- Cost Allocation
- Project Profitability
- ERP
- Accounting
Kalvyai Engineering · Engineering team
The engineers who build, connect and fix business systems at Kalvyai: Odoo, ERPNext, Shopify and AI agents that work inside them with approvals, budgets and an audit trail.



Comments
No comments yet. Questions and corrections are welcome.
Rate this post or leave a comment