Files
Odoo-Modules/fusion_plating/fusion_plating_jobs/security/ir.model.access.csv
gsinghpal 4e0b74d7ae feat(jobs): Sub 14 — configurable workflow state bar (Path B)
Replaces the generic Draft/Confirmed/In Progress/Done statusbar with
a shop-configurable list of plating-specific milestones. Bar advances
automatically as recipe steps complete; no manual button clicks.

What ships
==========

* New model: fp.job.workflow.state
  Catalog of milestones (name, code, sequence, color, triggers).
  Triggers can be:
    - trigger_default_kinds: "receiving,inspect" matches by step.default_kind
    - trigger_first_step_started: any wet/bake/mask/rack step started
    - trigger_all_steps_done: every non-cancelled step in done/skipped
    - block_when_quality_hold: held back while NCR/hold open
  Plus per-recipe-node override (see below).

* Default 7-state seed (data/fp_workflow_state_data.xml):
    Draft → Confirmed → Received → In Progress → Inspected → Shipped → Done
  noupdate=1 so per-shop edits survive module upgrade.

* Recipe-side trigger field on fusion.plating.process.node:
    triggers_workflow_state_id (Many2one, optional)
  Wins over default_kind matching. Lets the recipe author pin a
  specific step as a milestone trigger even when default_kind isn't
  set or doesn't match. Exposed in the Recipe Tree Editor properties
  panel (dropdown sourced from the catalog).

* fp.job.workflow_state_id (computed, stored)
  Iterates the catalog in sequence order; lands at the highest passed
  milestone. Recomputes on step state / kind / recipe_node / quality
  hold changes. Replaces fp.job.state on the form's statusbar.

* Settings UI: Configuration > Workflow States
  Standard list+form pages so admins can add / edit / deactivate
  states. Manager-group write permission, supervisor read.

What this does NOT do
=====================
  * Doesn't drop fp.job.state — that field still drives the internal
    state machine (button_confirm, action_cancel, etc.). Only the
    UI statusbar is reassigned.
  * No migration for existing jobs — they auto-recompute on next read
    because workflow_state_id is a stored compute with the right
    api.depends. Existing WH/JOB/00342 will display its current
    workflow state on next page load.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 23:39:38 -04:00

3.1 KiB

1idnamemodel_id:idgroup_id:idperm_readperm_writeperm_createperm_unlink
2access_fp_job_node_override_operatorfp.job.node.override.operatormodel_fp_job_node_overridefusion_plating.group_fusion_plating_operator1000
3access_fp_job_node_override_supervisorfp.job.node.override.supervisormodel_fp_job_node_overridefusion_plating.group_fusion_plating_supervisor1110
4access_fp_job_node_override_managerfp.job.node.override.managermodel_fp_job_node_overridefusion_plating.group_fusion_plating_manager1111
5access_fp_job_consumption_operatorfp.job.consumption.operatormodel_fp_job_consumptionfusion_plating.group_fusion_plating_operator1110
6access_fp_job_consumption_supervisorfp.job.consumption.supervisormodel_fp_job_consumptionfusion_plating.group_fusion_plating_supervisor1110
7access_fp_job_consumption_managerfp.job.consumption.managermodel_fp_job_consumptionfusion_plating.group_fusion_plating_manager1111
8access_fp_job_step_move_wiz_opfp.job.step.move.wiz.operatormodel_fp_job_step_move_wizardfusion_plating.group_fusion_plating_operator1111
9access_fp_job_step_move_wiz_supfp.job.step.move.wiz.supervisormodel_fp_job_step_move_wizardfusion_plating.group_fusion_plating_supervisor1111
10access_fp_job_step_move_wiz_mgrfp.job.step.move.wiz.managermodel_fp_job_step_move_wizardfusion_plating.group_fusion_plating_manager1111
11access_fp_job_step_move_wiz_in_opfp.job.step.move.wiz.in.operatormodel_fp_job_step_move_wizard_inputfusion_plating.group_fusion_plating_operator1111
12access_fp_job_step_move_wiz_in_supfp.job.step.move.wiz.in.supervisormodel_fp_job_step_move_wizard_inputfusion_plating.group_fusion_plating_supervisor1111
13access_fp_job_step_move_wiz_in_mgrfp.job.step.move.wiz.in.managermodel_fp_job_step_move_wizard_inputfusion_plating.group_fusion_plating_manager1111
14access_fp_job_step_input_wiz_opfp.job.step.input.wiz.operatormodel_fp_job_step_input_wizardfusion_plating.group_fusion_plating_operator1111
15access_fp_job_step_input_wiz_supfp.job.step.input.wiz.supervisormodel_fp_job_step_input_wizardfusion_plating.group_fusion_plating_supervisor1111
16access_fp_job_step_input_wiz_mgrfp.job.step.input.wiz.managermodel_fp_job_step_input_wizardfusion_plating.group_fusion_plating_manager1111
17access_fp_job_step_input_wiz_l_opfp.job.step.input.wiz.l.operatormodel_fp_job_step_input_wizard_linefusion_plating.group_fusion_plating_operator1111
18access_fp_job_step_input_wiz_l_supfp.job.step.input.wiz.l.supervisormodel_fp_job_step_input_wizard_linefusion_plating.group_fusion_plating_supervisor1111
19access_fp_job_step_input_wiz_l_mgrfp.job.step.input.wiz.l.managermodel_fp_job_step_input_wizard_linefusion_plating.group_fusion_plating_manager1111
20access_fp_workflow_state_opfp.workflow.state.operatormodel_fp_job_workflow_statefusion_plating.group_fusion_plating_operator1000
21access_fp_workflow_state_supfp.workflow.state.supervisormodel_fp_job_workflow_statefusion_plating.group_fusion_plating_supervisor1000
22access_fp_workflow_state_mgrfp.workflow.state.managermodel_fp_job_workflow_statefusion_plating.group_fusion_plating_manager1111