summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/portal/views/portal_templates.xml2
-rw-r--r--addons/project/controllers/portal.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/portal/views/portal_templates.xml b/addons/portal/views/portal_templates.xml
index 02a8d10301b..75827fe8ac9 100644
--- a/addons/portal/views/portal_templates.xml
+++ b/addons/portal/views/portal_templates.xml
@@ -262,7 +262,7 @@
<span class="small mr-1 navbar-text">Filter By:</span>
<div class="btn-group">
<button id="portal_searchbar_filters" data-toggle="dropdown" class="btn btn-secondary btn-sm dropdown-toggle">
- <t t-esc="searchbar_filters[filterby].get('label', 'All')"/>
+ <t t-esc="searchbar_filters.get(filterby,searchbar_filters.get('all')).get('label', 'All')"/>
</button>
<div class="dropdown-menu" aria-labelledby="portal_searchbar_filters">
<t t-foreach="searchbar_filters" t-as="option">
diff --git a/addons/project/controllers/portal.py b/addons/project/controllers/portal.py
index e80aaa647e2..43147037d2b 100644
--- a/addons/project/controllers/portal.py
+++ b/addons/project/controllers/portal.py
@@ -151,7 +151,7 @@ class CustomerPortal(CustomerPortal):
# default filter by value
if not filterby:
filterby = 'all'
- domain = searchbar_filters[filterby]['domain']
+ domain = searchbar_filters.get(filterby, searchbar_filters.get('all'))['domain']
# default group by value
if not groupby: