2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

Display allocations for individual stock items

This commit is contained in:
Oliver
2022-01-27 15:21:04 +11:00
parent 60cde7fe13
commit 5ec1d5aab8
4 changed files with 47 additions and 3 deletions

View File

@ -846,6 +846,12 @@ class SOAllocationList(generics.ListAPIView):
if order is not None:
queryset = queryset.filter(line__order=order)
# Filter by "stock item"
item = params.get('item', params.get('stock_item', None))
if item is not None:
queryset = queryset.filter(item=item)
# Filter by "outstanding" order status
outstanding = params.get('outstanding', None)
@ -865,7 +871,6 @@ class SOAllocationList(generics.ListAPIView):
# Default filterable fields
filter_fields = [
'item',
]