Fix burndown report in scrum

bzr revid: hda@tinyerp.com-20100223094817-7845noi14f0k5mlx
This commit is contained in:
PAP(OpenERP)
2010-02-23 15:18:17 +05:30
committed by HDA (OpenERP)
parent 111d3563b0
commit fda4cb99a0
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ def compute_burndown(cr, uid, tasks_id, date_start, date_stop):
cr.execute('select w.date,w.hours from project_task_work w left join project_task t on (t.id=w.task_id) where t.id = ANY(%s) and t.state in (%s,%s) order by date',(tasks_id,'open','progress',))
tasks2 = cr.fetchall()
cr.execute('select date_close,planned_hours from project_task where id =ANY(%s) and state in (%s,%s) order by date_close' ,(tasks_id,'cancelled','done',))
cr.execute('select date_end,planned_hours from project_task where id =ANY(%s) and state in (%s,%s) order by date_end' ,(tasks_id,'cancelled','done',))
tasks2 += cr.fetchall()
tasks2.sort()
else:
+2 -2
View File
@@ -45,7 +45,7 @@ def burndown_chart(cr, uid, tasks_id, date_start, date_stop):
cr.execute('select id,date_start,state,planned_hours from project_task where id = ANY(%s) order by date_start'(tasks_id,))
tasks = cr.fetchall()
cr.execute('select id,date_close,state,planned_hours*progress/100 from project_task where id =ANY(%s) and state in (%s,%s) order by date_close', (tasks_id,'progress','done',))
cr.execute('select id,date_end,state,planned_hours*progress/100 from project_task where id =ANY(%s) and state in (%s,%s) order by date_end', (tasks_id,'progress','done',))
tasks2 = cr.fetchall()
current_date = date_start
total = 0
@@ -79,7 +79,7 @@ class report_tasks(report_int):
else:
datas['date_start'] = time.strftime('%Y-%m-%d')
if 'date_stop' not in datas:
cr.execute('select max(date_start),max(date_close) from project_task where id = ANY(%s)',(ids,))
cr.execute('select max(date_start),max(date_end) from project_task where id = ANY(%s)',(ids,))
res = cr.fetchone()
datas['date_stop'] = (res[0] and res[0][:10]) or time.strftime('%Y-%m-%d')
if res[1] and datas['date_stop']<res[1]: