change from labels to fieldname in cur_frm.cscript

This commit is contained in:
Anand Doshi
2012-04-05 13:03:35 +05:30
parent 130dfaee8c
commit fa0cd89a7c
204 changed files with 389 additions and 1663 deletions

View File

@@ -60,7 +60,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
}, 1);
}
cur_frm.cscript['Add/Remove Recipients'] = function(doc, dt, dn) {
cur_frm.cscript.addremove_recipients = function(doc, dt, dn) {
// Get profile list
$c_obj(make_doclist(dt, dn), 'get_profiles', '', function(r, rt) {
if(r.exc) {

View File

@@ -74,8 +74,9 @@ class DocType:
d.fields.get('role')]) if perm.doctype=='DocPerm']
fl = ['', 'owner'] + [d.fieldname for d in doclist \
if d.doctype=='DocField' and d.fieldtype=='Link' \
and cstr(d.options)!='']
if d.doctype=='DocField' and ((d.fieldtype=='Link' \
and cstr(d.options)!='') or (d.fieldtype=='Select' and
'link:' in cstr(d.options).lower()))]
return {
'perms':ptype,

View File

@@ -30,7 +30,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
}
}
cur_frm.cscript['Clear Prices'] = function(doc, cdt, cdn) {
cur_frm.cscript.clear_prices = function(doc, cdt, cdn) {
if(confirm("This action will clear all rates for '"+ doc.name +"' from the Item Master and cannot be un-done. Are you sure you want to continue?")) {
$c_obj([doc], 'clear_prices', '', function(r, rt) { });
}