List route for tree browser based doctypes; Fixes to add child in tree browsers

This commit is contained in:
Anand Doshi
2014-04-22 18:54:54 +05:30
parent 4ef1835bee
commit 3e41fd1fd3
15 changed files with 150 additions and 145 deletions

View File

@@ -99,11 +99,12 @@ def add_ac(args=None):
args = frappe.local.form_dict
args.pop("cmd")
ac = frappe.get_doc(args)
ac.doctype = "Account"
ac = frappe.new_doc("Account")
ac.update(args)
ac.old_parent = ""
ac.freeze_account = "No"
ac.insert()
return ac.name
@frappe.whitelist()
@@ -112,8 +113,8 @@ def add_cc(args=None):
args = frappe.local.form_dict
args.pop("cmd")
cc = frappe.get_doc(args)
cc.doctype = "Cost Center"
cc = frappe.new_doc("Cost Center")
cc.update(args)
cc.old_parent = ""
cc.insert()
return cc.name