Merge pull request #21119 from rohitwaghchaure/fixed_parent_account_error_while_adding_equity_account_develop

fix: not able to add equity account in the chart of accounts
This commit is contained in:
Deepesh Garg 2020-03-30 12:15:01 +05:30 committed by GitHub
commit 025762f395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,7 +102,7 @@ class Account(NestedSet):
if not frappe.db.get_value("Account",
{'account_name': self.account_name, 'company': ancestors[0]}, 'name'):
frappe.throw(_("Please add the account to root level Company - %s" % ancestors[0]))
else:
elif self.parent_account:
descendants = get_descendants_of('Company', self.company)
if not descendants: return
parent_acc_name_map = {}