Files
Odoo-Modules/fusion_plating/fusion_plating_bridge_mrp/security/ir.model.access.csv
gsinghpal f340c87b6a feat(bridge_mrp): shop-role auto-routing + tablet worker mode (CHUNK 4/4)
Completes the worker-access story. Handoffs now route themselves.

New model fp.work.role with 8 seeded defaults (noupdate so shops can
rename/prune):
  masking · racking · plating_op · demask · oven · derack ·
  inspection · rework

Each one has a code, icon, description, sequence, active flag.
Config menu: Configuration → Shop Roles (manager-only).

Field additions:
  hr.employee.x_fc_work_role_ids (Many2many) — tag workers with the
    roles they perform. One-person shop: one employee, every role.
    Specialised shop: one role per employee. Cross-trained: multiple.
  fusion.plating.process.node.x_fc_work_role_id (Many2one) — tag
    each recipe operation with the role that performs it.
  mrp.workorder.x_fc_work_role_id (Many2one) — copied from the recipe
    operation on WO generation.

Auto-assignment on WO generation:
  _generate_workorders_from_recipe() now copies the operation's role
  onto the WO, then calls _fp_pick_worker_for_role() which picks the
  least-loaded employee (active WO count) with that role. WO lands in
  their Tablet "My Queue" the moment the MO is confirmed. No manual
  routing needed for the common case.

Tablet Station — worker mode:
  /fp/shopfloor/tablet_overview now filters to WOs where
  x_fc_assigned_user_id == env.user when the field is populated.
  KPIs (WOs Ready / In Progress) reflect the logged-in worker's load,
  not shop-wide totals. "My Queue" rows carry wo_state + can_start +
  can_finish so inline Start/Finish buttons appear.
  New JS handlers onStartWo / onFinishWo call /fp/shopfloor/start_wo
  and /fp/shopfloor/stop_wo (finish=true). One-tap progression.

Views:
  hr.employee form gets a "Shop Roles" notebook page with many2many_tags.
  Process node form gets x_fc_work_role_id inline after work_center_id.
  Work Order form shows role + assigned worker.

Smoke-tested end-to-end on WH/MO/00010:
  Masking      → Administrator (masking role)
  Racking      → Administrator (racking role)
  E-Nickel     → Andrew (plating_op, least-loaded tiebreaker)
  Demask       → Administrator (masking)
  Oven bake    → Andrew (oven)
  Derack       → Administrator (racking fallback)
  Post-plate QA → Administrator (inspection)

80 existing WOs backfilled with role + worker via name-match.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 20:08:23 -04:00

2.8 KiB

1idnamemodel_id:idgroup_id:idperm_readperm_writeperm_createperm_unlink
2access_fp_bridge_mrp_workcenter_managerfp.bridge.mrp.workcenter.managermrp.model_mrp_workcenterfusion_plating.group_fusion_plating_manager1110
3access_fp_bridge_mrp_workcenter_supervisorfp.bridge.mrp.workcenter.supervisormrp.model_mrp_workcenterfusion_plating.group_fusion_plating_supervisor1000
4access_fp_bridge_mrp_workorder_managerfp.bridge.mrp.workorder.managermrp_workorder.model_mrp_workorderfusion_plating.group_fusion_plating_manager1110
5access_fp_bridge_mrp_workorder_supervisorfp.bridge.mrp.workorder.supervisormrp_workorder.model_mrp_workorderfusion_plating.group_fusion_plating_supervisor1000
6access_fp_bridge_mrp_production_managerfp.bridge.mrp.production.managermrp.model_mrp_productionfusion_plating.group_fusion_plating_manager1110
7access_fp_bridge_mrp_production_supervisorfp.bridge.mrp.production.supervisormrp.model_mrp_productionfusion_plating.group_fusion_plating_supervisor1000
8access_fp_job_node_override_operatorfp.job.node.override.operatormodel_fusion_plating_job_node_overridefusion_plating.group_fusion_plating_operator1000
9access_fp_job_node_override_supervisorfp.job.node.override.supervisormodel_fusion_plating_job_node_overridefusion_plating.group_fusion_plating_supervisor1110
10access_fp_job_node_override_managerfp.job.node.override.managermodel_fusion_plating_job_node_overridefusion_plating.group_fusion_plating_manager1111
11access_fp_recipe_config_wizard_supervisorfp.recipe.config.wizard.supervisormodel_fp_recipe_config_wizardfusion_plating.group_fusion_plating_supervisor1110
12access_fp_recipe_config_wizard_managerfp.recipe.config.wizard.managermodel_fp_recipe_config_wizardfusion_plating.group_fusion_plating_manager1111
13access_fp_recipe_config_wizard_line_supervisorfp.recipe.config.wizard.line.supervisormodel_fp_recipe_config_wizard_linefusion_plating.group_fusion_plating_supervisor1110
14access_fp_recipe_config_wizard_line_managerfp.recipe.config.wizard.line.managermodel_fp_recipe_config_wizard_linefusion_plating.group_fusion_plating_manager1111
15access_fp_job_consumption_operatorfp.job.consumption.operatormodel_fp_job_consumptionfusion_plating.group_fusion_plating_operator1110
16access_fp_job_consumption_supervisorfp.job.consumption.supervisormodel_fp_job_consumptionfusion_plating.group_fusion_plating_supervisor1110
17access_fp_job_consumption_managerfp.job.consumption.managermodel_fp_job_consumptionfusion_plating.group_fusion_plating_manager1111
18access_fp_work_role_operatorfp.work.role.operatormodel_fp_work_rolefusion_plating.group_fusion_plating_operator1000
19access_fp_work_role_managerfp.work.role.managermodel_fp_work_rolefusion_plating.group_fusion_plating_manager1111