From 58858da1a10802c9f0c4f32ed719fd319e66536a Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Wed, 7 Jul 2010 18:48:15 +0530 Subject: [PATCH] [IMP]: crm: Improvement in lead and opportunity reports bzr revid: rpa@tinyerp.com-20100707131815-8s3qwdxhd6f0mv3t --- addons/crm/report/crm_lead_report.py | 2 +- addons/crm/report/crm_lead_report_view.xml | 17 ++++------------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/addons/crm/report/crm_lead_report.py b/addons/crm/report/crm_lead_report.py index f7cd5ba..0993cf2 100644 --- a/addons/crm/report/crm_lead_report.py +++ b/addons/crm/report/crm_lead_report.py @@ -146,7 +146,7 @@ class crm_lead_report(osv.osv): 0 as avg_answers, 0.0 as perc_done, 0.0 as perc_cancel, - (SELECT count(id) FROM mailgate_message WHERE model='crm.lead' AND res_id=c.id) AS email, + (SELECT count(id) FROM mailgate_message WHERE model='crm.lead' AND res_id=c.id AND history=True) AS email, date_trunc('day',c.create_date) as create_date, extract('epoch' from (c.date_closed-c.create_date))/(3600*24) as delay_close, extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24) as delay_expected, diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml index be76711..e180d59 100644 --- a/addons/crm/report/crm_lead_report_view.xml +++ b/addons/crm/report/crm_lead_report_view.xml @@ -56,15 +56,6 @@ - - - + domain="[('state','in',('draft','open'))]"/> @@ -149,7 +140,7 @@ crm.lead.report tree - + @@ -181,7 +172,7 @@ form {'search_default_lead':1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]} tree,graph - [] + [('type', '=', 'lead')] @@ -204,7 +195,7 @@ form {"search_default_opportunity": 1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]} tree,graph - [] + [('type', '=', 'opportunity')] -- 1.7.10.4