feat(claims): case-close audit accepts bundled pages flag

The signed-pages verification step on case close now treats the bundled
flag as 'pages present', matching the ready-for-submission gate and the
audit trail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-05-19 16:20:56 -04:00
parent 7a891c5aaa
commit 50539741ce
2 changed files with 13 additions and 1 deletions

View File

@@ -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)

View File

@@ -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