refactor(jobs): address code review feedback on fp.work.centre
- ACL: use group_fusion_plating_operator for read-only tier instead of base.group_user, matching the established hierarchy in the rest of ir.model.access.csv - Test: rename test_facility_required_for_active_centre → test_facility_optional_at_create. Old name claimed the opposite of what the assertion checks. - Manifest version bumped 19.0.8.1.0 → 19.0.8.1.1. Part of: native job model migration (spec 2026-04-25) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
{
|
||||
'name': 'Fusion Plating',
|
||||
'version': '19.0.8.1.0',
|
||||
'version': '19.0.8.1.1',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'Core plating / metal finishing ERP: facilities, processes, tanks, baths, jobs, operators.',
|
||||
'description': """
|
||||
|
||||
@@ -44,6 +44,6 @@ access_fp_replenishment_suggestion_manager,fp.replenishment.suggestion.manager,m
|
||||
access_fp_operator_cert_operator,fp.operator.cert.operator,model_fp_operator_certification,group_fusion_plating_operator,1,0,0,0
|
||||
access_fp_operator_cert_supervisor,fp.operator.cert.supervisor,model_fp_operator_certification,group_fusion_plating_supervisor,1,1,1,0
|
||||
access_fp_operator_cert_manager,fp.operator.cert.manager,model_fp_operator_certification,group_fusion_plating_manager,1,1,1,1
|
||||
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
|
||||
|
||||
|
@@ -13,7 +13,9 @@ class TestFpWorkCentre(TransactionCase):
|
||||
self.assertEqual(wc.kind, 'wet_line')
|
||||
self.assertTrue(wc.active)
|
||||
|
||||
def test_facility_required_for_active_centre(self):
|
||||
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',
|
||||
|
||||
Reference in New Issue
Block a user