mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-07 12:33:19 +00:00
fix: warehouse filter query by chaining conditions
(cherry picked from commit 7a266113ed)
This commit is contained in:
@@ -269,7 +269,7 @@ def apply_warehouse_filter(query, sle, filters):
|
|||||||
for condition in range_conditions[1:]:
|
for condition in range_conditions[1:]:
|
||||||
combined_condition = combined_condition | condition
|
combined_condition = combined_condition | condition
|
||||||
|
|
||||||
child_query = child_query.where(combined_condition & (warehouse_table.name == sle.warehouse))
|
child_query = child_query.where(combined_condition).where(warehouse_table.name == sle.warehouse)
|
||||||
|
|
||||||
query = query.where(ExistsCriterion(child_query))
|
query = query.where(ExistsCriterion(child_query))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user