fix: COA importer importing all accounts as group

(cherry picked from commit 8ccd3fee9e)
This commit is contained in:
Deepesh Garg
2021-10-29 16:08:52 +05:30
committed by mergify-bot
parent 4f7046e6c2
commit 0664e64003

View File

@@ -81,7 +81,7 @@ def add_suffix_if_duplicate(account_name, account_number, accounts):
def identify_is_group(child):
if child.get("is_group"):
is_group = child.get("is_group")
elif len(set(child.keys()) - set(["account_type", "root_type", "is_group", "tax_rate", "account_number"])):
elif len(set(child.keys()) - set(["account_name", "account_type", "root_type", "is_group", "tax_rate", "account_number"])):
is_group = 1
else:
is_group = 0