diff --git a/fusion_plating/fusion_plating_jobs/tests/test_fp_job_milestone_cascade.py b/fusion_plating/fusion_plating_jobs/tests/test_fp_job_milestone_cascade.py index 719d6b48..aaf28e9d 100644 --- a/fusion_plating/fusion_plating_jobs/tests/test_fp_job_milestone_cascade.py +++ b/fusion_plating/fusion_plating_jobs/tests/test_fp_job_milestone_cascade.py @@ -797,19 +797,15 @@ class TestReceivingGate(TransactionCase): 'qty': 1.0, 'sale_order_id': so.id, }) + # _fp_is_contract_review_step() matches case-insensitive name + # against "contract review" / "qa-005" OR recipe_node_id default_kind. + # Setting name='Contract Review' is the simplest reliable trigger + # and matches how operators tag the step in production. step_vals = { 'job_id': job.id, - 'name': 'Plate', + 'name': 'Contract Review' if is_cr else 'Plate', 'state': step_state, } - # If a step_kind model is available, set CR vs not via kind. - StepKind = self.env.get('fp.step.kind') - if StepKind is not None and is_cr: - cr_kind = StepKind.search( - [('code', '=', 'contract_review')], limit=1, - ) - if cr_kind: - step_vals['step_kind_id'] = cr_kind.id step = self.env['fp.job.step'].create(step_vals) return job, step