From 0111d8b79e1d60e6ece8573e33dc103e2ec72a3b Mon Sep 17 00:00:00 2001 From: "RCH(Open ERP)" <> Date: Tue, 2 Feb 2010 14:43:30 +0530 Subject: [PATCH 1/2] [Fix] report_task : problem of date_close. Replace date_close to date_end bzr revid: vir@tinyerp.com-20100202091330-u9x2765j9lwi7oyo --- addons/report_task/report_task.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/report_task/report_task.py b/addons/report_task/report_task.py index 2c13b570b86..2c53267f7d9 100644 --- a/addons/report_task/report_task.py +++ b/addons/report_task/report_task.py @@ -91,10 +91,11 @@ class report_closed_task(osv.osv): tsk.date_deadline as date_deadline, tsk.planned_hours as planned_hours, tsk.delay_hours as delay_hours, tsk.progress as progress, tsk.priority as priority, tsk.state as state, - tsk.remaining_hours as remaining_hours + tsk.remaining_hours as remaining_hours, tsk.date_end as date_close from project_task tsk - + where + (tsk.date_end <= CURRENT_DATE AND tsk.date_end > (CURRENT_DATE-15)) ) ''') report_closed_task() From f0e09d4726d6c45c7f6b8fa71f02e5bde763be9f Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Tue, 2 Feb 2010 15:03:00 +0530 Subject: [PATCH 2/2] [Fix] report_project : Changed to date_close to date_end bzr revid: vir@tinyerp.com-20100202093300-3do38c3ipo203lcy --- addons/report_project/report_project.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/addons/report_project/report_project.py b/addons/report_project/report_project.py index f894b9301dc..183163813da 100644 --- a/addons/report_project/report_project.py +++ b/addons/report_project/report_project.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -46,13 +46,13 @@ class report_project_task_user(osv.osv): create or replace view report_project_task_user as ( select min(t.id) as id, - to_char(date_close, 'YYYY') as name, - to_char(date_close, 'MM') as month, + to_char(date_end, 'YYYY') as name, + to_char(date_end, 'MM') as month, count(distinct t.id) as task_closed, t.user_id, t.project_id, sum(planned_hours) as hours_planned, - to_char(avg(date_close::abstime-t.create_date::timestamp), 'DD"d" HH24:MI:SS') as closing_days, + to_char(avg(date_end::abstime-t.create_date::timestamp), 'DD"d" HH24:MI:SS') as closing_days, sum(w.hours) as hours_effective, ((sum(planned_hours)-sum(w.hours))/count(distinct t.id))::decimal(16,2) as hours_delay from project_task t @@ -60,7 +60,7 @@ class report_project_task_user(osv.osv): where t.state='done' group by - to_char(date_close, 'YYYY'),to_char(date_close, 'MM'),t.user_id,project_id + to_char(date_end, 'YYYY'),to_char(date_end, 'MM'),t.user_id,project_id ) """) report_project_task_user() @@ -89,12 +89,12 @@ class report_project_task(osv.osv): create or replace view report_project_task as ( select min(t.id) as id, - to_char(date_close, 'YYYY') as name, - to_char(date_close, 'MM') as month, + to_char(date_end, 'YYYY') as name, + to_char(date_end, 'MM') as month, count(distinct t.id) as task_closed, t.project_id, sum(planned_hours) as hours_planned, - to_char(avg(date_close::abstime-t.create_date::timestamp), 'DD"d" HH12:MI:SS') as closing_days, + to_char(avg(date_end::abstime-t.create_date::timestamp), 'DD"d" HH12:MI:SS') as closing_days, sum(w.hours) as hours_effective, ((sum(planned_hours)-sum(w.hours))/count(distinct t.id))::decimal(16,2) as hours_delay from project_task t @@ -102,7 +102,7 @@ class report_project_task(osv.osv): where t.state='done' group by - to_char(date_close, 'YYYY'),to_char(date_close, 'MM'),project_id + to_char(date_end, 'YYYY'),to_char(date_end, 'MM'),project_id ) """) report_project_task()