diff options
| author | Jeremy Kersten <jke@odoo.com> | 2020-07-15 11:31:33 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2020-07-15 13:16:39 +0000 |
| commit | b3681bc85f44e68c46bee31fcadf8d9850029d4a (patch) | |
| tree | a77a00d179a618525f963891ec44bb05d6b4284e /addons/website_event/controllers/main.py | |
| parent | 59a156f80c19059c116a77b94da1ddd0747d8052 (diff) | |
[FIX] website_event: restore the online magic country
Removed with commit aebe199d80c5c7411c3db44386c7b9f3cc5b712d, but independant of is_online
Restore partially the feature, order by physical event is no more easy to restore
since is_online field doesn't exists anymore to sort.
Can be done as a custo if really required.
closes odoo/odoo#54516
X-original-commit: a6be8cfa40525c5d835cdb40e2e8936aeb36864c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/website_event/controllers/main.py')
| -rw-r--r-- | addons/website_event/controllers/main.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/website_event/controllers/main.py b/addons/website_event/controllers/main.py index f0c5351801f..4dff7fdd61d 100644 --- a/addons/website_event/controllers/main.py +++ b/addons/website_event/controllers/main.py @@ -100,9 +100,11 @@ class WebsiteEventController(http.Controller): current_type = EventType.browse(int(searches['type'])) domain_search["type"] = [("event_type_id", "=", int(searches["type"]))] - if searches["country"] != 'all': + if searches["country"] != 'all' and searches["country"] != 'online': current_country = request.env['res.country'].browse(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 = [] |
