summaryrefslogtreecommitdiff
path: root/addons/website_event/controllers/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website_event/controllers/main.py')
-rw-r--r--addons/website_event/controllers/main.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/addons/website_event/controllers/main.py b/addons/website_event/controllers/main.py
index a25542898ef..eac3c3e0a77 100644
--- a/addons/website_event/controllers/main.py
+++ b/addons/website_event/controllers/main.py
@@ -90,9 +90,12 @@ class website_event(http.Controller):
if searches["type"] != 'all':
current_type = type_obj.browse(cr, uid, int(searches['type']), context=context)
domain_search["type"] = [("type", "=", int(searches["type"]))]
- if searches["country"] != 'all':
+
+ if searches["country"] != 'all' and searches["country"] != 'online':
current_country = country_obj.browse(cr, uid, int(searches['country']), context=context)
- domain_search["country"] = [("country_id", "=", int(searches["country"]))]
+ domain_search["country"] = ['|', ("country_id", "=", int(searches["country"])), ("country_id", "=", False)]
+ elif searches["country"] == 'online':
+ domain_search["country"] = [("country_id", "=", False)]
def dom_without(without):
domain = [('state', "in", ['draft','confirm','done'])]
@@ -134,7 +137,13 @@ class website_event(http.Controller):
event_count = event_obj.search(
request.cr, request.uid, dom_without("none"), count=True,
context=request.context)
- pager = request.website.pager(url="/event", total=event_count, page=page, step=step, scope=5)
+ pager = request.website.pager(
+ url="/event",
+ url_args={'date': searches.get('date'), 'type': searches.get('type'), 'country': searches.get('country')},
+ total=event_count,
+ page=page,
+ step=step,
+ scope=5)
order = 'website_published desc, date_begin'
if searches.get('date','all') == 'old':