[MERGE] Merge crm improverment

bzr revid: sbh@tinyerp.com-20110112100021-bgbpvvcm0c6ancrw
This commit is contained in:
Sbh (OpenERP)
2011-01-12 15:30:21 +05:30
2 changed files with 1 additions and 3 deletions
+1 -1
View File
@@ -54,7 +54,7 @@
<tree string="Phone Calls" colors="gray:state in ('draft', 'cancel','done','pending')">
<field name="date" string="Date"/>
<field name="name" string="Call Summary"/>
<field name="categ_id"/>
<field name="categ_id" string="Type" widget="selection"/>
<field name="user_id"/>
<field name="state"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
@@ -60,7 +60,6 @@ class crm_claim_report(osv.osv):
('11', 'November'), ('12', 'December')], 'Month', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'create_date': fields.datetime('Create Date', readonly=True),
'email': fields.integer('# Emails', size=128, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'delay_close': fields.float('Delay to close', digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', readonly=True, domain="[('type','=','claim')]"),
@@ -105,7 +104,6 @@ class crm_claim_report(osv.osv):
count(*) as nbr,
c.priority as priority,
c.type_action as type_action,
(SELECT count(id) FROM mailgate_message WHERE model='crm.claim' AND res_id=id AND history=True) AS email,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close,
(SELECT count(id) FROM mailgate_message WHERE model='crm.claim' AND res_id=c.id AND history=True) AS email,