Skip to content
Snippets Groups Projects
Commit 00ad7bcf authored by Rohan Nayani's avatar Rohan Nayani
Browse files

[IMP] Peoject->task - Dealy Value

bzr revid: ron@tinyerp.com-20101015133729-id40xkl3qb8lu20e
parent e1dcf5aa
Branches
Tags
No related merge requests found
......@@ -395,10 +395,13 @@ class task(osv.osv):
if hours.get(task.id, False):
dur_in_user_uom = uom_obj._compute_qty(cr, uid, default_uom, hours.get(task.id, 0.0), user_uom)
hours[task.id] = dur_in_user_uom
timespent=0
for task in self.browse(cr, uid, ids, context=context):
res[task.id] = {'effective_hours': hours.get(task.id, 0.0), 'total_hours': task.remaining_hours + hours.get(task.id, 0.0)}
res[task.id]['delay_hours'] = res[task.id]['total_hours'] - task.planned_hours
# res[task.id]['delay_hours'] = res[task.id]['total_hours'] - task.planned_hours
for ctimespent in task.work_ids:
timespent=timespent+ctimespent.hours
res[task.id]['delay_hours'] = task.planned_hours - timespent
res[task.id]['progress'] = 0.0
if (task.remaining_hours + hours.get(task.id, 0.0)):
res[task.id]['progress'] = round(min(100.0 * hours.get(task.id, 0.0) / res[task.id]['total_hours'], 99.99),2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment