perf: Ignore cancelled pick lists while fetching picked items (#35737)

This commit is contained in:
Ankush Menat 2023-06-16 15:26:01 +05:30 committed by GitHub
parent 07d748c290
commit 81f916b7d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -384,6 +384,7 @@ class PickList(Document):
(pi_item.item_code.isin([x.item_code for x in items]))
& ((pi_item.picked_qty > 0) | (pi_item.stock_qty > 0))
& (pi.status != "Completed")
& (pi.status != "Cancelled")
& (pi_item.docstatus != 2)
)
.groupby(