[Fix] chart of accounts root type is mandatory issue in charts.erpnext.com (#13467)

This commit is contained in:
rohitwaghchaure 2018-04-02 12:49:38 +05:30 committed by Nabin Hait
parent 220864b4f7
commit eedc0ac681

View File

@ -252,16 +252,11 @@ def add_ac(args=None):
if not ac.parent_account: if not ac.parent_account:
ac.parent_account = args.get("parent") ac.parent_account = args.get("parent")
if getattr(ac, 'is_root', None):
ac.parent_account=''
ac.old_parent = "" ac.old_parent = ""
ac.freeze_account = "No" ac.freeze_account = "No"
if cint(ac.get("is_root")): if cint(ac.get("is_root")):
ac.parent_account = None ac.parent_account = None
ac.flags.ignore_mandatory = True ac.flags.ignore_mandatory = True
else:
ac.root_type = None
ac.insert() ac.insert()