From cc59fcd75e031f79ab9404ef1fe67c320656c303 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 29 Mar 2019 19:20:47 +0530 Subject: [PATCH] fix: user not able to create chart of account in parent if child has no chart of account --- erpnext/accounts/doctype/account/account.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index ac74b4516a..3d9604d159 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -112,6 +112,8 @@ class Account(NestedSet): ["company", "name"], as_dict=True): acc_name_map[d["company"]] = d["name"] + if not acc_name_map: return + for company in descendants: doc = frappe.copy_doc(self) doc.flags.ignore_root_company_validation = True