[FIX] portal,project: allow other company users to correctly access my/tasks page

In multi-company configuration setup, Company A and Company B.
Have a project in Company A that I want to share with a user in
Company B. The user only has access to Company B.
Share using the project link and open using the user

Traceback error will raise.

Adding a default value to retrieve in case the filter option is used
but the user has no permissions on the records.

opw-2322236

closes odoo/odoo#57090

X-original-commit: bcb62e8f6e20bccc2f2350bdc1268c495b7103da
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
This commit is contained in:
Andrea Grazioso (agr-odoo)
2020-09-04 13:54:45 +00:00
parent c3a3e47f08
commit eda684fc61
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -265,7 +265,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">
+1 -1
View File
@@ -153,7 +153,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: