fix issues with access rules on teams in controller and portal views
This commit is contained in:
parent
b0060ad56b
commit
17b971f410
3 changed files with 3 additions and 4 deletions
|
|
@ -18,7 +18,7 @@
|
|||
#
|
||||
{
|
||||
'name': 'Sports Clinic Management',
|
||||
'version': '16.0.1.5.8',
|
||||
'version': '16.0.1.5.9',
|
||||
'summary': 'Manage the patients of a sports medicine clinic.',
|
||||
'description': """
|
||||
Adds the notion of sports teams, players (patients), coaches and treatment
|
||||
|
|
|
|||
|
|
@ -16,9 +16,8 @@ class TeamStaffPortal(CustomerPortal):
|
|||
@classmethod
|
||||
def _prepare_teams_domain(cls):
|
||||
user = http.request.env.user
|
||||
partner = http.request.env.user.partner_id
|
||||
return [
|
||||
('staff_ids', 'in', partner.team_staff_rel_ids.ids),
|
||||
('staff_ids.user_ids', 'in', user.id),
|
||||
]
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@
|
|||
</td>
|
||||
<td>
|
||||
<ul class="list-unstyled">
|
||||
<t t-foreach="player.team_ids" t-as="team">
|
||||
<t t-foreach="player.sudo().team_ids" t-as="team">
|
||||
<li>
|
||||
<a t-attf-href="/my/team?team_id={{ team.id }}"
|
||||
t-field="team.name"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue