[FIX] crm_claim: The report is wrong without the history column for the sql view
authorStephane Wirtel <stw@openerp.com>
Thu, 15 Sep 2011 14:46:11 +0000 (16:46 +0200)
committerStephane Wirtel <stw@openerp.com>
Thu, 15 Sep 2011 14:46:11 +0000 (16:46 +0200)
bzr revid: stw@openerp.com-20110915144611-z4pd13cef8fw9r5e

addons/crm_claim/report/crm_claim_report.py

index d84e3e0..6075a84 100644 (file)
@@ -104,7 +104,7 @@ class crm_claim_report(osv.osv):
                     c.type_action as type_action,
                     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,
+                    (SELECT count(id) FROM mail_message WHERE model='crm.claim' AND res_id=c.id) AS email,
                     extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24) as  delay_expected
                 from
                     crm_claim c