Merge pull request #40323 from deepeshgarg007/project_sales_filter
fix: Filter for projects in Sales Cycle
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index a477a0d..0d64188 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -352,7 +352,9 @@
ifelse = CustomFunction("IF", ["condition", "then", "else"])
if filters and filters.get("customer"):
- qb_filter_and_conditions.append(proj.customer == filters.get("customer"))
+ qb_filter_and_conditions.append(
+ (proj.customer == filters.get("customer")) | proj.customer.isnull() | proj.customer == ""
+ )
qb_filter_and_conditions.append(proj.status.notin(["Completed", "Cancelled"]))