fix: chart of accounts importer always error (#25882)
* fix: chart of accounts importer always error
chart of accounts importer always error Parent Account Missing
* Update chart_of_accounts_importer.py
diff --git a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py
index ef44626..3b764aa 100644
--- a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py
+++ b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py
@@ -293,7 +293,7 @@
accounts_dict = {}
for account in accounts:
accounts_dict.setdefault(account["account_name"], account)
- if not hasattr(account, "parent_account"):
+ if "parent_account" not in account:
msg = _("Please make sure the file you are using has 'Parent Account' column present in the header.")
msg += "<br><br>"
msg += _("Alternatively, you can download the template and fill your data in.")