Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Anand Doshi
2012-12-06 15:15:18 +05:30
4 changed files with 42 additions and 41 deletions

View File

@@ -902,7 +902,7 @@ def assign_task_to_owner(inv, msg, users):
def get_bank_cash_account(mode_of_payment):
val = webnotes.conn.get_value("Mode of Payment", mode_of_payment, "default_account")
if not val:
webnotes.msgprint("Default Account not set in Mode of Payment: %s" % mode_of_payment)
webnotes.msgprint("Default Bank / Cash Account not set in Mode of Payment: %s. Please add a Default Account in Mode of Payment master." % mode_of_payment)
return {
"cash_bank_account": val
}

View File

@@ -128,13 +128,11 @@ erpnext.AccountsChart = Class.extend({
var node_links = [];
// edit
if (wn.boot.profile.can_read.indexOf(this.ctype) !== -1) {
if (wn.model.can_read(this.ctype) !== -1) {
node_links.push('<a onclick="erpnext.account_chart.open();">Edit</a>');
}
if (data.expandable) {
if(this.can_create) {
node_links.push('<a onclick="erpnext.account_chart.new_node();">Add Child</a>');
}
node_links.push('<a onclick="erpnext.account_chart.new_node();">Add Child</a>');
} else if (this.ctype === 'Account' && wn.boot.profile.can_read.indexOf("GL Entry") !== -1) {
node_links.push('<a onclick="erpnext.account_chart.show_ledger();">View Ledger</a>');
}