docs(jobs): tighten spec/plan after Task 1.2 review

- Spec §5.3: document that default_oven_id is deferred to the
  fusion_plating_jobs bridge module (fusion.plating.bake.oven lives
  in shopfloor; core can't depend on it).
- Plan: align ACL blocks for Tasks 1.2/1.3/1.5/1.7 to use
  group_fusion_plating_operator for the lowest tier instead of
  base.group_user. Caught by the code-quality reviewer on Task 1.2;
  this prevents the same bug recurring in later tasks.
- Plan Task 1.2 test name corrected:
  test_facility_required_for_active_centre →
  test_facility_optional_at_create.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-04-24 21:30:23 -04:00
parent 26928713d5
commit 93e0be4b48
2 changed files with 7 additions and 9 deletions

View File

@@ -124,15 +124,15 @@ class TestFpWorkCentre(TransactionCase):
self.assertEqual(wc.kind, 'wet_line')
self.assertTrue(wc.active)
def test_facility_required_for_active_centre(self):
# Active centre without facility raises on confirm path
# (we treat facility as soft-required: warning, not constraint)
def test_facility_optional_at_create(self):
# Facility is soft-required (warning at confirm, not constraint
# at create) — verify a centre without facility still creates.
wc = self.env['fp.work.centre'].create({
'name': 'Test',
'code': 'T',
'kind': 'other',
})
self.assertFalse(wc.facility_id) # allowed at create time
self.assertFalse(wc.facility_id)
def test_kind_selection_values(self):
kinds = dict(
@@ -221,7 +221,7 @@ from . import fp_work_centre
Modify `fusion_plating/security/ir.model.access.csv` — append:
```csv
access_fp_work_centre_user,fp.work.centre.user,model_fp_work_centre,base.group_user,1,0,0,0
access_fp_work_centre_operator,fp.work.centre.operator,model_fp_work_centre,fusion_plating.group_fusion_plating_operator,1,0,0,0
access_fp_work_centre_supervisor,fp.work.centre.supervisor,model_fp_work_centre,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_work_centre_manager,fp.work.centre.manager,model_fp_work_centre,fusion_plating.group_fusion_plating_manager,1,1,1,1
```
@@ -477,7 +477,6 @@ Modify `fusion_plating/__manifest__.py` — add `'data/fp_job_sequences.xml'` to
Modify `fusion_plating/security/ir.model.access.csv` — append:
```csv
access_fp_job_user,fp.job.user,model_fp_job,base.group_user,1,0,0,0
access_fp_job_operator,fp.job.operator,model_fp_job,fusion_plating.group_fusion_plating_operator,1,1,0,0
access_fp_job_supervisor,fp.job.supervisor,model_fp_job,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_job_manager,fp.job.manager,model_fp_job,fusion_plating.group_fusion_plating_manager,1,1,1,1
@@ -899,7 +898,6 @@ Modify `fusion_plating/models/fp_job.py` — add field after `qc_check_id`:
Modify `fusion_plating/security/ir.model.access.csv` — append:
```csv
access_fp_job_step_user,fp.job.step.user,model_fp_job_step,base.group_user,1,0,0,0
access_fp_job_step_operator,fp.job.step.operator,model_fp_job_step,fusion_plating.group_fusion_plating_operator,1,1,0,0
access_fp_job_step_supervisor,fp.job.step.supervisor,model_fp_job_step,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_job_step_manager,fp.job.step.manager,model_fp_job_step,fusion_plating.group_fusion_plating_manager,1,1,1,1
@@ -1200,7 +1198,6 @@ Replace `button_start` and `button_finish` to manage timelogs and `duration_actu
Modify `fusion_plating/security/ir.model.access.csv` — append:
```csv
access_fp_job_step_timelog_user,fp.job.step.timelog.user,model_fp_job_step_timelog,base.group_user,1,0,0,0
access_fp_job_step_timelog_operator,fp.job.step.timelog.operator,model_fp_job_step_timelog,fusion_plating.group_fusion_plating_operator,1,1,1,0
access_fp_job_step_timelog_manager,fp.job.step.timelog.manager,model_fp_job_step_timelog,fusion_plating.group_fusion_plating_manager,1,1,1,1
```

View File

@@ -220,7 +220,8 @@ domain-specific (a tank line, a bake oven, a rack station — not assembly cells
| `facility_id` | Many2one(fp.facility) | Which facility |
| `kind` | Selection | `wet_line`, `bake`, `mask`, `rack`, `inspect`, `other` |
| `cost_per_hour` | Monetary | For margin calculations |
| `default_bath_id, default_tank_id, default_oven_id` | Many2one | Single-line shop convenience |
| `default_bath_id, default_tank_id` | Many2one(`fusion.plating.bath`/`.tank`) | Single-line shop convenience |
| `default_oven_id` | Many2one(`fusion.plating.bake.oven`) | **Deferred to `fusion_plating_jobs` bridge module via `_inherit`**`bake.oven` is defined in `fusion_plating_shopfloor` which `fusion_plating` core cannot depend on. Bridge module *can* depend on shopfloor and adds this field there. |
| `active` | Boolean | |
This replaces `x_fc_mrp_workcenter_id` mapping that the recipe operations have today.