mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-02 04:58:29 +00:00
fix: include company in filter condition
(cherry picked from commit b92f8bc514)
This commit is contained in:
@@ -271,10 +271,14 @@ def get_project_name(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
qb_filter_or_conditions = []
|
qb_filter_or_conditions = []
|
||||||
ifelse = CustomFunction("IF", ["condition", "then", "else"])
|
ifelse = CustomFunction("IF", ["condition", "then", "else"])
|
||||||
|
|
||||||
if filters and filters.get("customer"):
|
if filters:
|
||||||
qb_filter_and_conditions.append(
|
if filters.get("customer"):
|
||||||
(proj.customer == filters.get("customer")) | proj.customer.isnull() | proj.customer == ""
|
qb_filter_and_conditions.append(
|
||||||
)
|
(proj.customer == filters.get("customer")) | proj.customer.isnull() | proj.customer == ""
|
||||||
|
)
|
||||||
|
|
||||||
|
if filters.get("company"):
|
||||||
|
qb_filter_and_conditions.append(proj.company == filters.get("company"))
|
||||||
|
|
||||||
qb_filter_and_conditions.append(proj.status.notin(["Completed", "Cancelled"]))
|
qb_filter_and_conditions.append(proj.status.notin(["Completed", "Cancelled"]))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user