bemade_sports_clinic: update portal view and color backend list views.

This commit is contained in:
Marc Durepos 2023-11-06 20:18:11 -05:00
parent 33cf931299
commit 44f391802d
2 changed files with 28 additions and 19 deletions

View file

@ -68,12 +68,18 @@
else 'text-warning') if stage != 'healthy'
else '' }}">
<td>
<strong><a t-attf-href="{{ url }}" t-field="player.last_name"/></strong>
<strong><span t-field="player.last_name"/></strong>
</td>
<td>
<strong><a t-attf-href="{{ url }}" t-field="player.first_name"/></strong>
<strong><span t-field="player.first_name"/></strong>
</td>
<td class="text-center">
<a t-if="player.active_injury_count" t-attf-href="{{ url }}">
<span t-field="player.active_injury_count"/>
<span class="fa fa-external-link"></span>
</a>
<span t-else="">0</span>
</td>
<td><span t-field="player.active_injury_count"/></td>
<td><span t-field="player.match_status"/></td>
<td><span t-field="player.practice_status"/></td>
<td>
@ -114,10 +120,10 @@
else 'text-warning') if stage != 'healthy'
else '' }}">
<td>
<strong><a t-attf-href="{{ url }}" t-field="player.last_name"/></strong>
<strong><span t-field="player.last_name"/></strong>
</td>
<td>
<strong><a t-attf-href="{{ url }}" t-field="player.first_name"/></strong>
<strong><span t-field="player.first_name"/></strong>
</td>
<td>
<ul class="list-unstyled">
@ -129,7 +135,13 @@
</t>
</ul>
</td>
<td><span t-field="player.active_injury_count"/></td>
<td class="text-center">
<a t-if="player.active_injury_count" t-attf-href="{{ url }}">
<span t-field="player.active_injury_count"/>
<span class="fa fa-external-link"></span>
</a>
<span t-else="">0</span>
</td>
<td><span t-field="player.match_status"/></td>
<td><span t-field="player.practice_status"/></td>
<td>

View file

@ -23,17 +23,16 @@
<field name="model">sports.patient</field>
<field name="arch" type="xml">
<tree string="Patients"
decoration-danger="match_status == 'no'
and practice_status == 'no'"
decoration-warning="match_status == 'no'
and practice_status != 'no'">
decoration-danger="stage == 'no_play'"
decoration-warning="stage == 'practice_ok'">
<field name="first_name"/>
<field name="last_name"/>
<field name="date_of_birth"/>
<field name="age"/>
<field name="team_ids" widget="many2many_tags"/>
<field name="match_status"/>
<field name="practice_status"/>
<field name="match_status" optional="hide"/>
<field name="practice_status" optional="hide"/>
<field name="stage" optional="show"/>
<field name="predicted_return_date" widget="date"/>
<field name="return_date" widget="date"/>
<field name="activity_ids" widget="list_activity"/>
@ -45,18 +44,16 @@
<field name="model">sports.patient</field>
<field name="arch" type="xml">
<tree string="Patients" multi_edit="True" editable="bottom"
decoration-danger="match_status == 'no'
and practice_status == 'no'"
decoration-warning="match_status == 'no'
and practice_status == 'no_contact'">
decoration-danger="stage == 'no_play'"
decoration-warning="stage == 'practice_ok'">
<field name="first_name"/>
<field name="last_name"/>
<field name="date_of_birth"/>
<field name="age"/>
<field name="team_ids" widget="many2many_tags"/>
<field name="match_status"
/>
<field name="practice_status"/>
<field name="match_status" optional="hide"/>
<field name="practice_status" optional="hide"/>
<field name="stage" optional="show"/>
<field name="predicted_return_date" widget="date"/>
<field name="return_date" widget="date"/>
<field name="activity_ids" widget="list_activity"/>