[account_budget] crossovered_budget_report fetches practical amount over wrong period
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Committed
|
Medium
|
OpenERP R&D Addons Team 3 |
Bug Description
When inside a budget we have multiple lines describing different periods for the same analytic account the calculation for the practically spent amount is queried X amount times, each of these queries uses the period defined in the wizard.
Assume following budget lines:
Date From | Date To | Analytic Account | Budgeted amount
2009-01-01 | 2009-12-31 | 300 | 500
2010-01-01 | 2010-12-31 | 300 | 700
2011-01-01 | 2011-12-31 | 300 | 1100
2012-01-01 | 2012-12-31 | 300 | 1500
2013-01-01 | 2013-12-31 | 300 | 2000
We then assume an analytic entry as follows :
Date | Amount | Analytic Account
2009-06-13 | 450 | 300
The resulting report if you run it with dates : 2009-01-01 to 2010-12-31
it will show that you have used 2700 out of the available 1200.
The reason it's 2700 is because there are 6 budget lines with analytic account id 300 and 6x450 = 2700.
Each time it is querying how much was spent for each budget line it specifies a date via the context[
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 31 lines (+11/-3)1 file modifiedaccount_budget/report/crossovered_budget_report.py (+11/-3)
- Lionel Sausin - Initiatives/Numérigraphe (community): Needs Fixing
- OpenERP Core Team: Pending requested
-
Diff: 31 lines (+11/-3)1 file modifiedaccount_budget/report/crossovered_budget_report.py (+11/-3)
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3) |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: | added: budget |
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
Hello Niels,
Thanks for the good trace and branch.
I have faced the same problem on 7.0 as well as trunk also.
Thanks again!