← Back to team overview

openerp-india team mailing list archive

[Bug 1100396] [NEW] [account_budget] crossovered_budget_report fetches practical amount over wrong period

 

Public bug reported:

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['wizard_date_from'] and
context['wizard_date_to'] and it passes the dates we passed, so when
querying every budget line it actually asks, how much was spent between
'2009-01-01' and '2010-12-31'  whereas it should ask, how much was spent
in the period covered by the budget line.

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1100396

Title:
  [account_budget] crossovered_budget_report fetches practical amount
  over wrong period

Status in OpenERP Addons (modules):
  New

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['wizard_date_from'] and
  context['wizard_date_to'] and it passes the dates we passed, so when
  querying every budget line it actually asks, how much was spent
  between '2009-01-01' and '2010-12-31'  whereas it should ask, how much
  was spent in the period covered by the budget line.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1100396/+subscriptions


Follow ups

References