mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
[get_query]to server side
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user