[IMP]Filter records in which start date and duration are null also duration is 0.

bzr revid: vme@tinyerp.com-20140314122303-q7hgy4a3ij91yfxu
This commit is contained in:
Vidhin Mehta (OpenERP) 2014-03-14 17:53:03 +05:30
parent 54fd56bd7d
commit cfa67eeace
1 changed files with 4 additions and 2 deletions

View File

@ -107,6 +107,7 @@ class website_event(http.Controller):
Select id, location_id, groupby_datetime, duration, name, date from (
Select id, location_id, to_char(date_trunc('hour',date),'mm-dd-yy hh AM') as
groupby_datetime, duration, name, event_id, date, count(*) as tot from event_track
where date IS NOT NULL AND duration IS NOT NULL AND duration != 0
group by event_id, duration, id, location_id, date, date_trunc('hour',date)
order by date, date_trunc('hour',date)
)
@ -116,6 +117,7 @@ class website_event(http.Controller):
''',(event.id,))
fetch_tracks = request.cr.fetchall()
print "vvvv",fetch_tracks
request.cr.execute('''
select count(*), date_trunc('day',date) from event_track where event_id = %s group by date_trunc('day',date) order by date_trunc('day',date)