queries to server side

This commit is contained in:
Saurabh
2013-07-10 13:07:49 +05:30
parent 2e3c06e66d
commit f52dc07a58
10 changed files with 125 additions and 54 deletions

View File

@@ -20,10 +20,16 @@ cur_frm.cscript.refresh = function(doc) {
}
cur_frm.set_query("current_bom", function(doc) {
return erpnext.queries.bom({name: "!" + doc.new_bom});
return{
query:"controllers.queries.bom",
filters: {name: "!" + doc.new_bom}
}
});
cur_frm.set_query("new_bom", function(doc) {
return erpnext.queries.bom({name: "!" + doc.current_bom});
return{
query:"controllers.queries.bom",
filters: {name: "!" + doc.current_bom}
}
});

View File

@@ -117,6 +117,9 @@ cur_frm.fields_dict['project_name'].get_query = function(doc, dt, dn) {
cur_frm.set_query("bom_no", function(doc) {
if (doc.production_item) {
return erpnext.queries.bom({item: cstr(doc.production_item)});
return{
query:"controllers.queries.bom",
filters: {item: cstr(doc.production_item)}
}
} else msgprint(" Please enter Production Item first");
});