diff options
| author | Christophe Simonis <chs@odoo.com> | 2014-09-05 15:28:22 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2014-09-05 15:28:22 +0200 |
| commit | 31bf30d2d0eb78baaa36360b99fe58bf7cd4c9e7 (patch) | |
| tree | d7be61ecd6bb4c8b5552e39b03e2a64eebbbf323 /addons/website_event/controllers/main.py | |
| parent | afba9e8817c458640ae446ac7aaaab79be4fe1e9 (diff) | |
| parent | ed1c173971968eaa96693cb4e1547efa6e6c34e0 (diff) | |
[MERGE] forward port of branch 8.0 up to ed1c173
Diffstat (limited to 'addons/website_event/controllers/main.py')
| -rw-r--r-- | addons/website_event/controllers/main.py | 15 |
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': |
