mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-27 02:28:30 +00:00
fix(manufacturing): handle empty list in query builder
(cherry picked from commit 9e5d94c1e6)
This commit is contained in:
@@ -78,10 +78,12 @@ class MaterialRequirementsPlanningReport:
|
|||||||
(so.docstatus == 1)
|
(so.docstatus == 1)
|
||||||
& (so.status.notin(["Closed", "Completed", "Stopped"]))
|
& (so.status.notin(["Closed", "Completed", "Stopped"]))
|
||||||
& (so_item.docstatus == 1)
|
& (so_item.docstatus == 1)
|
||||||
& (so_item.item_code.isin(items))
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if items:
|
||||||
|
query = query.where(so_item.item_code.isin(items))
|
||||||
|
|
||||||
if self.filters.get("warehouse"):
|
if self.filters.get("warehouse"):
|
||||||
warehouses = [self.filters.get("warehouse")]
|
warehouses = [self.filters.get("warehouse")]
|
||||||
if frappe.db.get_value("Warehouse", self.filters.get("warehouse"), "is_group"):
|
if frappe.db.get_value("Warehouse", self.filters.get("warehouse"), "is_group"):
|
||||||
|
|||||||
Reference in New Issue
Block a user