diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2008-02-05 20:27:36 +0000 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2008-02-05 20:27:36 +0000 |
| commit | d80a097fe76fbdf223f431f124f2eb2d6e40823a (patch) | |
| tree | 6f48be49623e10a9b459f58cd4d0a8810686790f /addons/report_task/report_task.py | |
| parent | 075e447ed75b817cf10d7e5e5454532a39dd6527 (diff) | |
Bugfixes and improvement
bzr revid: fp@tinyerp.com-55519a2f81bdd9229604b2bdbf9585ea972f2ff9
Diffstat (limited to 'addons/report_task/report_task.py')
| -rw-r--r-- | addons/report_task/report_task.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/addons/report_task/report_task.py b/addons/report_task/report_task.py index 12643afcfb4..bb5f195f3d5 100644 --- a/addons/report_task/report_task.py +++ b/addons/report_task/report_task.py @@ -39,6 +39,7 @@ class report_task_user_pipeline_open (osv.osv): 'task_hrs': fields.float('Task Hours', readonly=True), 'task_progress': fields.float('Task Progress', readonly=True), 'company_id' : fields.many2one('res.company', 'Company'), + 'task_state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done'),('no','No Task')], 'State', readonly=True), } def init(self, cr): @@ -50,12 +51,16 @@ class report_task_user_pipeline_open (osv.osv): u.company_id as company_id, count(t.*) as task_nbr, sum(t.planned_hours) as task_hrs, - sum(t.planned_hours * (100 - t.progress) / 100) as task_progress + sum(t.planned_hours * (100 - t.progress) / 100) as task_progress, + case when t.state is null then 'no' else t.state end as task_state from res_users u - left join project_task t on (u.id = t.user_id) + left join + project_task t on (u.id = t.user_id) + where + u.active group by - u.id, u.company_id + u.id, u.company_id, t.state ) ''') report_task_user_pipeline_open() |
