From 2ac1835f7dbd10e8872d3cf7e77d91d78b0c584b Mon Sep 17 00:00:00 2001 From: Saurabh Date: Mon, 1 Jan 2018 16:17:43 +0530 Subject: [PATCH] [fix] if is_root is true make parent account empty (#12255) --- erpnext/accounts/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 8cf1f51bed..e5809fec58 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -252,6 +252,9 @@ def add_ac(args=None): if not ac.parent_account: ac.parent_account = args.get("parent") + if ac.is_root: + ac.parent_account='' + ac.old_parent = "" ac.freeze_account = "No" if cint(ac.get("is_root")):