fix(employee-form): drop invalid color_field reference on Shop Roles m2m

The 'Tasks This Operator Can Do' many2many_tags widget declared
options="{'no_create_edit': True, 'color_field': 'color'}" but
fp.work.role doesn't have a color field — Odoo then tried to
fetch it on every employee form load and crashed with:

    ValueError: Invalid field 'color' on 'fp.work.role'

Dropped the color_field option. Roles still render as tags, just
without the coloured chip background. (If we want coloured chips
later, add a Color integer field to fp.work.role and restore the
option — but the feature wasn't wired up anyway.)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-04-18 23:12:38 -04:00
parent 0f41eb136d
commit da1ca06510

View File

@@ -95,7 +95,7 @@
<group string="Tasks This Operator Can Do">
<field name="x_fc_work_role_ids"
widget="many2many_tags"
options="{'no_create_edit': True, 'color_field': 'color'}"
options="{'no_create_edit': True}"
placeholder="Tag the shop roles this employee performs..."/>
<div class="text-muted small" colspan="2">
Work orders tagged with these roles auto-assign to