summaryrefslogtreecommitdiff
path: root/addons/project_issue/report/project_issue_report.py
diff options
context:
space:
mode:
authorThibault Francois <tfr@openerp.com>2011-04-07 13:41:45 +0200
committerThibault Francois <tfr@openerp.com>2011-04-07 13:41:45 +0200
commitb11a71fd8751bc4fb33faa1f95f7915e230b86ab (patch)
tree15aa10c814bd240a7f3a6e2ae6cff0ae67b296de /addons/project_issue/report/project_issue_report.py
parent1a45ff614d9da8c39a120335d2f84ac454c47417 (diff)
[MERGE] improvement project-issue
bzr revid: tfr@openerp.com-20110407114145-xvr27pjquxwk9ff0
Diffstat (limited to 'addons/project_issue/report/project_issue_report.py')
-rw-r--r--addons/project_issue/report/project_issue_report.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py
index b66963569e7..29542f32912 100644
--- a/addons/project_issue/report/project_issue_report.py
+++ b/addons/project_issue/report/project_issue_report.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -16,7 +16,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 <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -101,10 +101,11 @@ class project_issue_report(osv.osv):
c.task_id,
date_trunc('day',c.create_date) as create_date,
extract('epoch' from (c.date_open-c.create_date))/(3600*24) as delay_open,
- extract('epoch' from (c.date_closed-c.create_date))/(3600*24) as delay_close,
+ extract('epoch' from (c.date_closed-c.date_open))/(3600*24) as delay_close,
(SELECT count(id) FROM mailgate_message WHERE model='project.issue' AND res_id=c.id) AS email
FROM
project_issue c
+ WHERE c.categ_id IN (select id from crm_case_categ where object_id in (select id from ir_model where model = 'project.issue'))
)""")
project_issue_report()