[get_query]to server side

This commit is contained in:
Saurabh
2013-07-09 18:20:49 +05:30
parent 38683718e1
commit 2e3c06e66d
33 changed files with 13 additions and 193 deletions

View File

@@ -106,16 +106,12 @@ cur_frm.fields_dict['production_item'].get_query = function(doc) {
['Item', 'is_pro_applicable', '=', 'Yes']
]
}
// return 'SELECT DISTINCT `tabItem`.`name`, `tabItem`.`description` FROM `tabItem` WHERE (IFNULL(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` = "0000-00-00" OR `tabItem`.`end_of_life` > NOW()) AND `tabItem`.docstatus != 2 AND `tabItem`.is_pro_applicable = "Yes" AND `tabItem`.%(key)s LIKE "%s" ORDER BY `tabItem`.`name` LIMIT 50';
}
cur_frm.fields_dict['project_name'].get_query = function(doc, dt, dn) {
return{
filters:['Project', 'status', 'not in', 'Completed, Cancelled']
}
// return 'SELECT `tabProject`.name FROM `tabProject` \
// WHERE `tabProject`.status not in ("Completed", "Cancelled") \
// AND `tabProject`.name LIKE "%s" ORDER BY `tabProject`.name ASC LIMIT 50';
}