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

@@ -42,6 +42,12 @@ class FusionClockShift(models.Model):
)
active = fields.Boolean(default=True)
color = fields.Char(string='Color', default='#3B82F6')
role_id = fields.Many2one(
'fusion.clock.role',
string='Default Role',
help="Role assigned to shifts created from this template "
"(drives the colour/label on the employee's portal schedule).",
)
# Weekday pattern — which days this recurring shift applies as the baseline
# when there is no posted planner entry for the day. Default Mon-Fri.