mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
queries to server side
This commit is contained in:
@@ -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}
|
||||
}
|
||||
});
|
||||
@@ -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");
|
||||
});
|
||||
Reference in New Issue
Block a user