openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #27596
[Bug 1279922] Re: [account_budget] When computing theorical amount one (1) day is missing from elapsed days and total days
Hello,
The fix has been merged with main stable branch by revno: 9972 and
revision-id: mat@xxxxxxxxxxx-20140410151717-gzoucjmshb2y2j6i.
Thanks.
** Changed in: openobject-addons
Status: Fix Committed => Fix Released
--
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/1279922
Title:
[account_budget] When computing theorical amount one (1) day is
missing from elapsed days and total days
Status in OpenERP Addons (modules):
Fix Released
Bug description:
On runbot
http://7-0-30413.runbot.openerp.com/?db=7-0-30413-all&ts=1392313676667#id=4&view_type=form&model=crossovered.budget&action=603
Date of computation: 02/13/2014
Create a Budget: Budget 2014
from: 01/01/2014
to: 12/31/2014
Budget Lines:
Analytic Account | Budgetary Position | Start Date | End Date | Paid Date |Planned Amount | Practical Amount | Theoretical Amount | Percentage
Seagate P1 | Purchases | 02/01/2014 | 02/28/2014 | False | 28000.00 | 0.00 | >> 12444.44 << | 0.00
Theorical Amount : 12444.44
This value is wrong
[7.0] http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/view/head:/account_budget/account_budget.py#L167
[trnk] http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/account_budget/account_budget.py#L165
These lines say:
theo_amt = float(elapsed.days / float(total.days)) *
line.planned_amount
theo_amt = float( (02/13/2014 - 02/01/2014).days / float( ( 02/28/2014
- 02/01/2014).days )) * 28000
theo_amt = float( 12 / float( 27 )) * 28000
theo_amt = 12444.44
This should be like this:
theo_amt = float(( elapsed.days + 1) / float(total.days + 1)) *
line.planned_amount
theo_amt = float( ((02/13/2014 - 02/01/2014).days + 1)/ float( (
02/28/2014 - 02/01/2014).days + 1)) * 28000
theo_amt = float( 13 / float( 28 )) * 28000
theo_amt = 13000.00
Best Regards.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1279922/+subscriptions
References