From 6f563d6284e397cb23aa060a548b4af765c4c97f Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=A9ry=20Debongnie?= Date: Fri, 25 Jul 2014 15:52:38 +0200 Subject: [PATCH] [FIX] correctly type date field in crm_lead_report opening_date and date_closed were cast to char but are supposed to be dates. When you try to group crm_lead_report by one of them, postgres was not happy. Now, it properly tells postgres that they are of type date. --- addons/crm/report/crm_lead_report.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm/report/crm_lead_report.py b/addons/crm/report/crm_lead_report.py index 32851a7..2b46be9 100644 --- a/addons/crm/report/crm_lead_report.py +++ b/addons/crm/report/crm_lead_report.py @@ -88,8 +88,8 @@ class crm_lead_report(osv.osv): id, c.date_deadline, - to_char(c.date_open, 'YYYY-MM-DD') as opening_date, - to_char(c.date_closed, 'YYYY-mm-dd') as date_closed, + date(c.date_open) as opening_date, + date(c.date_closed) as date_closed, date_trunc('day',c.date_last_stage_update) as date_last_stage_update, -- 1.7.10.4