From 23436ca25943037a01a1ff435e05aaa32a9ffed3 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 28 Jul 2014 19:34:12 +0200 Subject: [PATCH] [FIX] website_event: display unconfirmed events too --- addons/website_event/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_event/controllers/main.py b/addons/website_event/controllers/main.py index 71432404f3a..58573a2ee30 100644 --- a/addons/website_event/controllers/main.py +++ b/addons/website_event/controllers/main.py @@ -245,9 +245,9 @@ class website_event(http.Controller): result = {'events':[],'country':False} if country_code: country_ids = country_obj.search(request.cr, request.uid, [('code', '=', country_code)], context=request.context) - event_ids = event_obj.search(request.cr, request.uid, ['|', ('address_id', '=', None),('country_id.code', '=', country_code),('date_begin','>=', time.strftime('%Y-%m-%d 00:00:00')),('state', '=', 'confirm')], order="date_begin", context=request.context) + event_ids = event_obj.search(request.cr, request.uid, ['|', ('address_id', '=', None),('country_id.code', '=', country_code),('date_begin','>=', time.strftime('%Y-%m-%d 00:00:00'))], order="date_begin", context=request.context) if not event_ids: - event_ids = event_obj.search(request.cr, request.uid, [('date_begin','>=', time.strftime('%Y-%m-%d 00:00:00')),('state', '=', 'confirm')], order="date_begin", context=request.context) + event_ids = event_obj.search(request.cr, request.uid, [('date_begin','>=', time.strftime('%Y-%m-%d 00:00:00'))], order="date_begin", context=request.context) for event in event_obj.browse(request.cr, request.uid, event_ids, context=request.context)[:6]: if country_code and event.country_id.code == country_code: result['country'] = country_obj.browse(request.cr, request.uid, country_ids[0], context=request.context)