[get_query]to server side

This commit is contained in:
Saurabh
2013-07-09 16:18:52 +05:30
parent ebe50397d9
commit ab462d2000
52 changed files with 692 additions and 314 deletions

View File

@@ -122,8 +122,15 @@ cur_frm.cscript.make_contact = function() {
}
cur_frm.fields_dict['customer_group'].get_query = function(doc,dt,dn) {
return 'SELECT `tabCustomer Group`.`name`, `tabCustomer Group`.`parent_customer_group` FROM `tabCustomer Group` WHERE `tabCustomer Group`.`is_group` = "No" AND `tabCustomer Group`.`docstatus`!= 2 AND `tabCustomer Group`.%(key)s LIKE "%s" ORDER BY `tabCustomer Group`.`name` ASC LIMIT 50';
return{
filters:{'is_group': 'No'}
}
// return 'SELECT `tabCustomer Group`.`name`, `tabCustomer Group`.`parent_customer_group` FROM `tabCustomer Group` WHERE `tabCustomer Group`.`is_group` = "No" AND `tabCustomer Group`.`docstatus`!= 2 AND `tabCustomer Group`.%(key)s LIKE "%s" ORDER BY `tabCustomer Group`.`name` ASC LIMIT 50';
}
cur_frm.fields_dict.lead_name.get_query = erpnext.utils.lead_query;
cur_frm.fields_dict.lead_name.get_query = function(doc,cdt,cdn) {
return{
query:"controllers.queries.lead_query"
}
}