get_query for profile based link fields to enable searching by name

This commit is contained in:
Anand Doshi
2012-11-19 15:43:18 +05:30
parent f26511e466
commit e65e621145
11 changed files with 65 additions and 17 deletions

View File

@@ -50,6 +50,10 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
}
}
cur_frm.cscript.make_communication_body();
if(cur_frm.fields_dict.contact_by.df.options.match(/^Profile/)) {
cur_frm.fields_dict.contact_by.get_query = erpnext.utils.profile_query;
}
}
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
@@ -337,4 +341,4 @@ cur_frm.cscript.on_submit = function(doc, cdt, cdn) {
doctype: 'Quotation'
}
cur_frm.cscript.notify(doc, args);
}
}