diff --git a/fusion_claims/tests/test_signed_pages_gate.py b/fusion_claims/tests/test_signed_pages_gate.py index 48729da6..44501bd9 100644 --- a/fusion_claims/tests/test_signed_pages_gate.py +++ b/fusion_claims/tests/test_signed_pages_gate.py @@ -94,3 +94,15 @@ class TestSignedPagesGate(TransactionCase): }) wizard.action_confirm() self.assertEqual(self.order.x_fc_adp_application_status, 'ready_submission') + + def test_case_close_audit_accepts_bundled_flag(self): + """Case-close audit treats bundled flag as 'signed pages present'.""" + self.order.x_fc_pages_11_12_in_original = True + self.order.flush_recordset() + + wizard = self.env['fusion_claims.case.close.verification.wizard'].with_context( + active_id=self.order.id, active_model='sale.order', + ).create({ + 'sale_order_id': self.order.id, + }) + self.assertTrue(wizard.has_signed_pages) diff --git a/fusion_claims/wizard/case_close_verification_wizard.py b/fusion_claims/wizard/case_close_verification_wizard.py index 72d40902..e9132eac 100644 --- a/fusion_claims/wizard/case_close_verification_wizard.py +++ b/fusion_claims/wizard/case_close_verification_wizard.py @@ -78,7 +78,7 @@ class CaseCloseVerificationWizard(models.TransientModel): def _compute_document_status(self): for wizard in self: order = wizard.sale_order_id - wizard.has_signed_pages = bool(order.x_fc_signed_pages_11_12) + wizard.has_signed_pages = order.x_fc_has_signed_pages_11_12 wizard.has_final_application = bool(order.x_fc_final_submitted_application) wizard.has_proof_of_delivery = bool(order.x_fc_proof_of_delivery) wizard.has_vendor_bills = len(order.x_fc_vendor_bill_ids) > 0