[enhance] treeview to BOM, sales person, Cost Center and Chart of acounts

This commit is contained in:
Saurabh
2016-05-30 17:54:16 +05:30
parent 5f48cb6128
commit 0e47bfeb16
5 changed files with 83 additions and 1 deletions

View File

@@ -135,6 +135,10 @@ def add_ac(args=None):
args.pop("ignore_permissions")
ac.update(args)
if not ac.parent_account:
ac.parent_account = args.get("parent")
ac.old_parent = ""
ac.freeze_account = "No"
if cint(ac.get("is_root")):
@@ -153,6 +157,10 @@ def add_cc(args=None):
cc = frappe.new_doc("Cost Center")
cc.update(args)
if not cc.parent_cost_center:
cc.parent_cost_center = args.get("parent")
cc.old_parent = ""
cc.insert()
return cc.name