diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index a597d5f20a5..0bea30f0857 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -347,7 +347,9 @@ def get_project_name(doctype, txt, searchfield, start, page_len, filters): 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"]))