[docs] [setup] cleanup

This commit is contained in:
Rushabh Mehta
2013-06-24 15:43:18 +05:30
parent 7fba9b31d9
commit 847cfe2b07
12 changed files with 482 additions and 23 deletions

View File

@@ -117,7 +117,7 @@ erpnext.AccountsChart = Class.extend({
me.company = company;
this.tree = new wn.ui.Tree({
parent: $(wrapper),
label: company,
label: ctype==="Account" ? "Accounts" : "Cost Centers",
args: {ctype: ctype, comp: company},
method: 'accounts.page.accounts_browser.accounts_browser.get_children',
click: function(link) {

View File

@@ -31,14 +31,14 @@ def get_children():
company_field = ctype=='Account' and 'company' or 'company_name'
# root
if args['parent'] == company:
if args['parent'] in ("Accounts", "Cost Centers"):
acc = webnotes.conn.sql(""" select
name as value, if(group_or_ledger='Group', 1, 0) as expandable
from `tab%s`
where ifnull(parent_%s,'') = ''
and %s = %s and docstatus<2
order by name""" % (ctype, ctype.lower().replace(' ','_'), company_field, '%s'),
args['parent'], as_dict=1)
company, as_dict=1)
else:
# other
acc = webnotes.conn.sql("""select