change from labels to fieldname in cur_frm.cscript
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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) { });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user