From 3a5bff774d508bd249425834644fb7f851ada585 Mon Sep 17 00:00:00 2001 From: Dibik Date: Mon, 1 Jul 2024 19:13:28 +0530 Subject: [PATCH] G2P-2420: Account number mapping into the payment model --- g2p_programs/models/managers/payment_manager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/g2p_programs/models/managers/payment_manager.py b/g2p_programs/models/managers/payment_manager.py index a59ac40f..fc17aa6f 100644 --- a/g2p_programs/models/managers/payment_manager.py +++ b/g2p_programs/models/managers/payment_manager.py @@ -222,6 +222,11 @@ def _prepare_payments(self, cycle, entitlements): "state": "issued", } ) + if payment.partner_id.bank_ids: + payment.account_number = payment.partner_id.bank_ids[0].acc_number + else: + payment.account_number = None + if not payments: payments = payment else: