[account_budget] When computing theorical amount one (1) day is missing from elapsed days and total days
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP Publisher's Warranty Team |
Bug Description
On runbot
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://
[trnk] http://
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.
Related branches
- Martin Trigaux (OpenERP) (community): Approve
-
Diff: 11 lines (+1/-1)1 file modifiedaccount_budget/account_budget.py (+1/-1)
Changed in openobject-addons: | |
status: | New → Confirmed |
description: | updated |
Changed in openobject-addons: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
tags: | added: maintenance |
Hi,
Thanks for the report.
This issue has been fixed in the branch: lp:~openerp-dev/openobject-addons/7.0-opw-606232-rgo by revision-id: <email address hidden> and revision#: 9966
Soon, the branch will be reviewed by our experts and will be integrated with main stable branch.
Thanks.