mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 09:05:00 +00:00
fix: remove disabled warehouse in get_warehouses_based_on_account
This commit is contained in:
@@ -240,7 +240,9 @@ def get_child_warehouses(warehouse):
|
||||
|
||||
def get_warehouses_based_on_account(account, company=None):
|
||||
warehouses = []
|
||||
for d in frappe.get_all("Warehouse", fields=["name", "is_group"], filters={"account": account}):
|
||||
for d in frappe.get_all(
|
||||
"Warehouse", fields=["name", "is_group"], filters={"account": account, "disabled": 0}
|
||||
):
|
||||
if d.is_group:
|
||||
warehouses.extend(get_child_warehouses(d.name))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user