[patch][fix] party model - create debtors and creditors only if parent account exists

This commit is contained in:
Nabin Hait 2015-05-21 16:50:25 +05:30
parent 1686876b23
commit 4888a5dc0d

View File

@ -19,6 +19,7 @@ def create_receivable_payable_account():
receivable_payable_accounts = frappe._dict()
def _create_account(args):
if args["parent_account"]:
account_id = frappe.db.get_value("Account",
{"account_name": args["account_name"], "company": args["company"]})
if not account_id: