fix: added is_stock_item filter (#25530)
This commit is contained in:
parent
134eaa5786
commit
4ecae62194
@ -29,7 +29,10 @@ frappe.ui.form.on("BOM", {
|
|||||||
|
|
||||||
frm.set_query("item", function() {
|
frm.set_query("item", function() {
|
||||||
return {
|
return {
|
||||||
query: "erpnext.manufacturing.doctype.bom.bom.item_query"
|
query: "erpnext.manufacturing.doctype.bom.bom.item_query",
|
||||||
|
filters: {
|
||||||
|
"is_stock_item": 1
|
||||||
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -973,6 +973,9 @@ def item_query(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
if not has_variants:
|
if not has_variants:
|
||||||
query_filters["has_variants"] = 0
|
query_filters["has_variants"] = 0
|
||||||
|
|
||||||
|
if filters and filters.get("is_stock_item"):
|
||||||
|
query_filters["is_stock_item"] = 1
|
||||||
|
|
||||||
return frappe.get_all("Item",
|
return frappe.get_all("Item",
|
||||||
fields = fields, filters=query_filters,
|
fields = fields, filters=query_filters,
|
||||||
or_filters = or_cond_filters, order_by=order_by,
|
or_filters = or_cond_filters, order_by=order_by,
|
||||||
|
Loading…
Reference in New Issue
Block a user