| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) • Purchase (purchase) |
| Community Apps Dependencies | Show |
| Lines of code | 12986 |
| Technical Name |
eh_account_dynamic_reports_budget |
| License | LGPL-3 |
| Website | https://www.erpheritage.com.au/ |
| Versions | 16.0 17.0 18.0 19.0 |
Dynamic Reports Budget Columns
Adds live budget-vs-actual comparison columns to the Profit and Loss report when you select a budget in report options.
Why this module
Dynamic Reports Budget Columns
Selection-based activation
Budget columns appear only when you choose a budget in the report's budget_id option. Without selection, the P&L displays normally. No automatic generation or module-level defaults.
Type-based section reconciliation
Income and expense section budgets are derived from account types, not summed from arbitrary budget lines. This ensures section totals always reconcile exactly with actuals.
Requires budget module
Depends on eh_account_budget_pro to provide the budget records and budget line data. Cannot function standalone.
Day in the life
Manager reviews P&L with budget
You open the dynamic P&L report, select a budget from the options, and the report renders three columns: Amount (actual), Budget, and Budget Variance. You scan account variances to identify where spending exceeded forecast and drill into accounts to trace the differences. The section totals and net profit line all show matching budget and variance figures.
Edge cases
The cases most modules quietly ignore.
In the shipped code today, each one a place where a cheaper module silently does the wrong thing.
If budget_id is passed but the budget record is deleted or does not exist, the module falls back to the standard P&L (no budget columns) without error.
Budget lines with a budgeted_amount of 0 or null are treated as 0; variance is simply the actual amount. No division or special handling.
If a budget line references an account whose type is not in INCOME_TYPES or EXPENSE_TYPES, it is excluded from section and net profit budgets but still displayed on its account line.
All totals (section budgets, net budget, variances) are rounded to 2 decimal places to match monetary precision.
What is inside
Built to do the job, end to end.
- models/profit_and_loss_budget.py. EhProfitAndLossBudgetHandler abstract model inherits the base P&L handler. On compute(), it fetches the budget record, aggregates budgeted_amount per account and by type, appends Budget and Budget Variance columns to the payload, and populates line values and section totals.
- models/__init__.py. Imports profit_and_loss_budget module to register the handler model with Odoo.
- tests/test_pl_budget_columns.py. Two integration tests: one verifies budget and variance columns are present and correct when a budget is selected; the second confirms columns do not appear when budget_id is omitted from options.
- __manifest__.py. Declares dependency on eh_account_dynamic_reports (core P&L handler) and eh_account_budget_pro (budget records and line data). LGPL-3 license, v19.0.1.0.0.
Honest about the edges
What this does not do, so nothing surprises you.
- Requires eh_account_budget_pro module; does not work without it.
- Budget columns only appear when user explicitly selects budget_id in report options; no defaults or automatic activation.
- Does not generate or forecast budgets; only displays and compares existing budget records.
- Budgets must be manually created in eh.budget.budget before the report can use them.
- Section reconciliation follows Odoo account types (INCOME_TYPES, EXPENSE_TYPES constants); non-standard account types are excluded from section totals.
- Does not support multi-currency or per-budget-line date filtering; aggregates all lines within the selected budget.
budget P&L report, budget vs actual, variance analysis, Odoo 19 accounting, profit and loss budget, management reporting, budget comparison report, actual variance, section budget, account budget tracking, financial variance, budget performance, Odoo Community budget
Languages
Available in 19 languages
The interface ships translated out of the box. Switch language in Odoo and the fields, menus, and messages follow.
Please log in to comment on this module