fix: not able to add equity account in the chart of accounts

This commit is contained in:
Rohit Waghchaure 2020-03-29 16:33:30 +05:30
parent da6fb435dd
commit cdf80eb4ad

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 = {}