dynamic query for root in sales browser, validation for tree structure document

This commit is contained in:
Nabin Hait
2012-12-12 16:26:39 +05:30
parent 73ccac4ccb
commit 06cbd3427f
11 changed files with 59 additions and 33 deletions

View File

@@ -39,8 +39,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
'is_pl_account', 'company'], false);
// read-only for root accounts
root_acc = doc.parent ? false : true;
if(in_list(root_acc, doc.account_name)) {
if(!doc.parent_account) {
cur_frm.perm = [[1,0,0], [1,0,0]];
cur_frm.set_intro("This is a root account and cannot be edited.");
} else {