diff --git a/fusion_claims/tests/test_signed_pages_gate.py b/fusion_claims/tests/test_signed_pages_gate.py index 8a1d890d..48729da6 100644 --- a/fusion_claims/tests/test_signed_pages_gate.py +++ b/fusion_claims/tests/test_signed_pages_gate.py @@ -71,3 +71,26 @@ class TestSignedPagesGate(TransactionCase): self.order.x_fc_signed_pages_11_12 = _b64_pdf() self.order.flush_recordset() self.assertTrue(self.order.x_fc_trail_has_signed_pages) + + def test_ready_for_submission_passes_with_bundled_flag_only(self): + """Ready-for-submission gate passes when bundled flag is True even + without a separate signed-pages file.""" + self.order.write({ + 'x_fc_adp_application_status': 'application_received', + 'x_fc_original_application': _b64_pdf(), + 'x_fc_original_application_filename': 'app.pdf', + 'x_fc_pages_11_12_in_original': True, + 'x_fc_client_ref_1': 'JODO', + 'x_fc_client_ref_2': '1234', + 'x_fc_reason_for_application': 'first_access', + }) + self.order.flush_recordset() + + wizard = self.env['fusion_claims.ready.for.submission.wizard'].with_context( + active_id=self.order.id, active_model='sale.order', + ).create({ + 'sale_order_id': self.order.id, + 'claim_authorization_date': '2026-05-01', + }) + wizard.action_confirm() + self.assertEqual(self.order.x_fc_adp_application_status, 'ready_submission') diff --git a/fusion_claims/wizard/ready_for_submission_wizard.py b/fusion_claims/wizard/ready_for_submission_wizard.py index 763f3b75..bc0a802c 100644 --- a/fusion_claims/wizard/ready_for_submission_wizard.py +++ b/fusion_claims/wizard/ready_for_submission_wizard.py @@ -92,7 +92,7 @@ class ReadyForSubmissionWizard(models.TransientModel): wizard.has_authorization_date = bool(order.x_fc_claim_authorization_date) wizard.has_client_refs = bool(order.x_fc_client_ref_1 and order.x_fc_client_ref_2) wizard.has_reason = bool(order.x_fc_reason_for_application) - wizard.has_documents = bool(order.x_fc_original_application and order.x_fc_signed_pages_11_12) + wizard.has_documents = bool(order.x_fc_original_application and order.x_fc_has_signed_pages_11_12) @api.model def default_get(self, fields_list): @@ -145,7 +145,7 @@ class ReadyForSubmissionWizard(models.TransientModel): # Check documents if not order.x_fc_original_application: missing.append('Original ADP Application (upload in Application Received step)') - if not order.x_fc_signed_pages_11_12: + if not order.x_fc_has_signed_pages_11_12: missing.append('Page 11 & 12 Signed (upload in Application Received step)') if missing: