feat(fusion_planning): hide Role field from Add Shift dialog

Role is still auto-pulled from the employee's Default Role on the
employee profile (planning.slot._compute_role_id reads
resource_id.default_role_id). Hiding the manual Role field declutters
the Add Shift dialog so the manager doesn't have to think about it on
each shift.

If a shift needs a one-off role override, an admin can still set it
via the backend list view or by editing the resource's default role.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-05-07 07:52:13 -04:00
parent d5e954d45c
commit b7817b752c
2 changed files with 7 additions and 1 deletions

View File

@@ -5,7 +5,7 @@
{
'name': 'Fusion Planning',
'version': '19.0.1.1.0',
'version': '19.0.1.1.1',
'category': 'Human Resources/Planning',
'summary': 'Fusion Clock bridge to Odoo Planning - employee schedule on the portal',
'description': """

View File

@@ -16,6 +16,12 @@
invisible="id"
groups="planning.group_planning_manager"/>
</xpath>
<!-- Hide the manual Role field from the Add Shift dialog. Role is
still auto-pulled from the employee's Default Role on the
employee profile via planning.slot._compute_role_id. -->
<xpath expr="//field[@name='role_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>