156 lines
7.6 KiB
XML
156 lines
7.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="teams_view_search" model="ir.ui.view">
|
|
<field name="name">teams.view.search</field>
|
|
<field name="model">sports.team</field>
|
|
<field name="arch" type="xml">
|
|
<search>
|
|
<field name="name"/>
|
|
<field name="parent_id" string="Parent Organization"/>
|
|
<field name="head_coach_id"/>
|
|
<field name="head_therapist_id"/>
|
|
<filter context="{'group_by': 'parent_id'}" name="groupby_parent_id"/>
|
|
<filter context="{'group_by': 'head_coach_id'}" name="groupby_head_coach_id"/>
|
|
<filter context="{'group_by': 'head_therapist_id'}" name="groupby_head_therapist_id"/>
|
|
</search></field>
|
|
</record>
|
|
<record id="sports_team_view_kanban" model="ir.ui.view">
|
|
<field name="name">sports.team.view.kanban</field>
|
|
<field name="model">sports.team</field>
|
|
<field name="arch" type="xml">
|
|
<kanban archivable="false" default_group_by="parent_id" default_order="name" group_create="false" group_delete="false">
|
|
<field name="name"/>
|
|
<field name="parent_id"/>
|
|
<field name="head_coach_name"/>
|
|
<field name="head_therapist_name"/>
|
|
<field name="injured_count"/>
|
|
<field name="healthy_count"/>
|
|
<templates>
|
|
<t t-name="card">
|
|
<div t-attf-class="oe_kanban_content oe_kanban_global_click">
|
|
<div>
|
|
<strong class="o_kanban_record_title">
|
|
<span>
|
|
<field name="name"/>
|
|
</span>
|
|
</strong>
|
|
</div>
|
|
<div>
|
|
<span class="o_kanban_record_subtitle">
|
|
<field name="parent_id"/>
|
|
</span>
|
|
</div>
|
|
<div>
|
|
<span>
|
|
Head coach:
|
|
<field name="head_coach_name"/>
|
|
</span>
|
|
</div>
|
|
<div>
|
|
<span>
|
|
Head therapist:
|
|
<field name="head_therapist_name"/>
|
|
</span>
|
|
</div>
|
|
<div class="o_kanban_record_bottom">
|
|
<div class="oe_kanban_bottom_left">
|
|
<span class="text-success">
|
|
Healthy:
|
|
<field name="healthy_count"/>
|
|
</span>
|
|
</div>
|
|
<div class="oe_kanban_bottom_right">
|
|
<span t-attf-class="{{record.injured_count.value != 0 ? 'text-danger' : ''}}">
|
|
Injured:
|
|
<field name="injured_count"/>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban></field>
|
|
</record>
|
|
<record id="sports_team_view_list" model="ir.ui.view">
|
|
<field name="name">sports.team.view.list</field>
|
|
<field name="model">sports.team</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Sports Teams">
|
|
<field name="name"/>
|
|
<field name="parent_id"/>
|
|
<field name="head_coach_id"/>
|
|
<field name="head_therapist_id"/>
|
|
<field name="player_count"/>
|
|
<field name="injured_count"/>
|
|
</list></field>
|
|
</record>
|
|
<record id="sports_team_view_form" model="ir.ui.view">
|
|
<field name="name">sports.team.view.form</field>
|
|
<field name="model">sports.team</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<field invisible="1" name="id"/>
|
|
<header/>
|
|
<sheet>
|
|
<div class="oe_button_box"/>
|
|
<div class="oe_title">
|
|
<h1>
|
|
<field name="name"/>
|
|
</h1>
|
|
</div>
|
|
<group string="Team Information">
|
|
<group>
|
|
<field name="parent_id"/>
|
|
<field name="player_count"/>
|
|
<field name="injured_count"/>
|
|
</group>
|
|
<group>
|
|
<field name="staff_ids"><list>
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name"/>
|
|
<field name="role"/>
|
|
<field name="mobile" widget="phone"/>
|
|
<field column_invisible="True" name="has_portal_access"/>
|
|
<field column_invisible="True" name="partner_id"/>
|
|
<button class="oe_highlight" groups="bemade_sports_clinic.group_sports_clinic_admin,base.group_system" icon="fa-user-plus" invisible="has_portal_access == True" name="action_grant_portal_access" title="Grant Portal Access" type="object"/>
|
|
<button class="oe_highlight" groups="bemade_sports_clinic.group_sports_clinic_admin,base.group_system" icon="fa-ban" invisible="has_portal_access == False" name="action_revoke_portal_access" title="Revoke Portal Access" type="object"/>
|
|
</list></field>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page name="players" string="Players">
|
|
<field name="patient_ids" nolabel="1"
|
|
context="{'list_view_ref': 'bemade_sports_clinic.sports_patient_view_list_embedded'}"/>
|
|
</page>
|
|
<page name="user_access"
|
|
string="User Access"
|
|
groups="bemade_sports_clinic.group_sports_clinic_admin,base.group_system">
|
|
<field name="allowed_user_ids"/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<chatter reload_on_post="True"/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="sports_team_staff_view_form" model="ir.ui.view">
|
|
<field name="name">sports.team.staff.view.form</field>
|
|
<field name="model">sports.team.staff</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="partner_id"/>
|
|
<field name="parent_id"/>
|
|
<field name="role"/>
|
|
</group>
|
|
<group>
|
|
<field name="mobile" widget="phone"/>
|
|
<field name="email" widget="email"/>
|
|
</group>
|
|
</group>
|
|
</sheet>
|
|
</form></field>
|
|
</record>
|
|
</odoo>
|