diff options
| author | Denis Ledoux <dle@odoo.com> | 2014-07-28 19:34:12 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2014-07-28 19:34:12 +0200 |
| commit | 23436ca25943037a01a1ff435e05aaa32a9ffed3 (patch) | |
| tree | c156f3b78b55f6d7ddb9c0fc76b284cea7c4b872 /addons/website_event/controllers/main.py | |
| parent | eda2f064cffd0389cac5f5eb49b92516fda3e34e (diff) | |
[FIX] website_event: display unconfirmed events too
Diffstat (limited to 'addons/website_event/controllers/main.py')
| -rw-r--r-- | addons/website_event/controllers/main.py | 4 |
1 files 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) |
