fix: Use account_type == 'Stock' to filter stock accounts

(cherry picked from commit e2a163d4e9)
This commit is contained in:
marination
2022-04-26 17:50:51 +05:30
committed by mergify-bot
parent 38fbd94ac9
commit 93482f3302

View File

@@ -89,7 +89,7 @@ class Warehouse(NestedSet):
.on(ac.name == gle.account)
.select(gle.account)
.distinct()
.where((sle.warehouse == name) & (ac.root_type == "Asset"))
.where((sle.warehouse == name) & (ac.account_type == "Stock"))
.orderby(sle.creation)
.run(as_dict=True)
)