feat(fusion_clock): native shift roles (fusion.clock.role) [A1-A3]

Replaces Odoo Planning's planning.role: name+colour model with the same
1-11 palette, employee default/allowed role fields, Employee Roles editor,
role_id on shift template + schedule with default resolution, ACLs, menus.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-06-04 20:42:04 -04:00
parent 023fc95acd
commit b4ca85e291
13 changed files with 286 additions and 1 deletions

View File

@@ -33,6 +33,21 @@ class HrEmployee(models.Model):
help="Assigned shift schedule. Leave empty to use global defaults.",
)
# Shift roles (native replacement for Odoo Planning's employee role fields)
x_fclk_default_role_id = fields.Many2one(
'fusion.clock.role',
string='Default Shift Role',
help="Pre-fills the role on every new shift created for this employee.",
)
x_fclk_role_ids = fields.Many2many(
'fusion.clock.role',
'fclk_employee_role_rel',
'employee_id',
'role_id',
string='Allowed Shift Roles',
help="Roles this employee is allowed to be scheduled for.",
)
# Pending reason enforcement
x_fclk_pending_reason = fields.Boolean(
string='Pending Reason Required',