bemade-addons/bemade_sports_clinic/views/res_users_views.xml
Denis Durepos c0834eb327 [REF] bemade_sports_clinic: Remove injury models and simplify data model
- Removed models/injury_models.py and all its references
- Converted relational fields to character fields:
  - body_location_id → body_location
  - injury_type_id → injury_type
- Updated portal templates to use text inputs instead of dropdowns
- Updated controller code to process the new field formats
- Removed related access rights from security CSV
- Modified test files to accommodate the new structure

This refactoring simplifies the data model by removing unnecessary
classifications that were adding complexity without significant benefit.
The direct text fields maintain the same functionality while reducing
the database overhead and simplifying the UI.
2025-07-16 11:37:50 -04:00

43 lines
No EOL
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Add Sports Clinic security groups to the user form access rights section -->
<record id="view_users_form_inherit" model="ir.ui.view">
<field name="name">view.users.form.inherit</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="model">res.users</field>
<field name="arch" type="xml">
<!-- Add the existing page for team access -->
<page name="preferences" position="before">
<page name="sports_team_access" string="Sports Team Access"
groups="base.group_system,bemade_sports_clinic.group_sports_clinic_admin">
<group>
<field name="accessible_team_ids" widget="many2many_checkboxes"/>
</group>
</page>
</page>
<!-- Add a dedicated page for Sports Clinic permissions -->
<page name="access_rights" position="after">
<page name="sports_clinic_access" string="Sports Clinic Access Rights" groups="base.group_system">
<div class="alert alert-info" role="alert">
<p><strong>Role-Based Access Rights:</strong></p>
<p>Sports Clinic access rights are automatically managed based on team roles:</p>
<ul>
<li><strong>Treatment Professional access</strong> is granted to users with Therapist or Head Therapist roles in any team</li>
<li><strong>Coach access</strong> is granted to users with Coach, Head Coach, or Manager roles in any team</li>
</ul>
<p>For portal users, these roles determine what they can access in the portal interface. For internal users, corresponding security groups are also assigned.</p>
<p>When a user has multiple roles, treatment professional access takes precedence and grants additional permissions (e.g., parental consent field visibility).</p>
</div>
<group string="Team Roles">
<field name="partner_id" invisible="1"/>
<field name="share" invisible="1"/>
</group>
<field name="partner_id" widget="res_partner_many2one" readonly="1" options="{'always_reload': True}"/>
</page>
</page>
</field>
</record>
</odoo>