fix(create-accounts): set is_company_account=1 on auto-created Bank Accounts

Bank Accounts created via the "Create Bank Accounts" button represent
the user's own accounts at the bank — not counterparty accounts — so
they need is_company_account=1. Without it, ERPNext treats them as
external and they don't appear in Bank Reconciliation Tool or as
selectable paid_from/paid_to in Payment Entry / Journal Entry.
This commit is contained in:
Ali 2026-05-18 14:17:33 +00:00
parent c198574f6c
commit 37dbc2be48
1 changed files with 1 additions and 0 deletions

View File

@ -249,6 +249,7 @@ def create_unmapped_accounts(bank_integration):
ba.iban = row.iban ba.iban = row.iban
ba.bank = default_bank ba.bank = default_bank
ba.company = default_company ba.company = default_company
ba.is_company_account = 1
ba.bank_integration_type = "Bank Statement Importer" ba.bank_integration_type = "Bank Statement Importer"
ba.bank_integration = bi.name ba.bank_integration = bi.name
ba.insert(ignore_permissions=True) ba.insert(ignore_permissions=True)