2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

Display table of items received against a particular purchase order

- Adds new tab to "Purchase Order" view
- Adds ability to filter StockList API by purchase_order ID
This commit is contained in:
Oliver Walters
2020-10-19 11:40:57 +11:00
parent 2dc9109b11
commit 634410294b
5 changed files with 45 additions and 2 deletions

View File

@ -498,6 +498,11 @@ class StockList(generics.ListCreateAPIView):
if sales_order:
queryset = queryset.filter(sales_order=sales_order)
purchase_order = params.get('purchase_order', None)
if purchase_order is not None:
queryset = queryset.filter(purchase_order=purchase_order)
# Filter stock items which are installed in another (specific) stock item
installed_in = params.get('installed_in', None)