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',
|
'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.',
|
'summary': 'Manage the patients of a sports medicine clinic.',
|
||||||
'description': """
|
'description': """
|
||||||
Adds the notion of sports teams, players (patients), coaches and treatment
|
Adds the notion of sports teams, players (patients), coaches and treatment
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,8 @@ class TeamStaffPortal(CustomerPortal):
|
||||||
@classmethod
|
@classmethod
|
||||||
def _prepare_teams_domain(cls):
|
def _prepare_teams_domain(cls):
|
||||||
user = http.request.env.user
|
user = http.request.env.user
|
||||||
partner = http.request.env.user.partner_id
|
|
||||||
return [
|
return [
|
||||||
('staff_ids', 'in', partner.team_staff_rel_ids.ids),
|
('staff_ids.user_ids', 'in', user.id),
|
||||||
]
|
]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
<t t-foreach="player.team_ids" t-as="team">
|
<t t-foreach="player.sudo().team_ids" t-as="team">
|
||||||
<li>
|
<li>
|
||||||
<a t-attf-href="/my/team?team_id={{ team.id }}"
|
<a t-attf-href="/my/team?team_id={{ team.id }}"
|
||||||
t-field="team.name"/>
|
t-field="team.name"/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue