[fix] get_query where options not mentioned

This commit is contained in:
Nabin Hait
2013-07-10 20:30:00 +05:30
parent eddd4a1674
commit d96bfaf6af
3 changed files with 11 additions and 11 deletions

View File

@@ -99,24 +99,20 @@ cur_frm.fields_dict['system_role'].get_query = function(doc) {
}
}
// Approving Role Trigger
// -----------------------
// cur_frm.fields_dict['approving_role'].get_query = function(doc) {
// return 'SELECT tabRole.name FROM tabRole WHERE tabRole.name not in ("Administrator","Guest","All") AND tabRole.%(key)s LIKE "%s" LIMIT 50'
// }
// Master Name Trigger
// --------------------
cur_frm.fields_dict['master_name'].get_query = function(doc){
if(doc.based_on == 'Customerwise Discount')
return {
doctype: "Customer",
filters:[
['Customer', 'docstatus', '!=', 2]
]
}
else if(doc.based_on == 'Itemwise Discount')
return {
doctype: "Item",
query: "controllers.queries.item_query"
}
else