Filter stock list by "customer"

This commit is contained in:
Oliver Walters 2020-06-05 09:05:57 +10:00
parent 96b79397c2
commit 408c6a4040

View File

@ -471,6 +471,12 @@ class StockList(generics.ListCreateAPIView):
if sales_order:
queryset = queryset.filter(sales_order=sales_order)
# Filter by customer
customer = params.get('customer', None)
if customer:
queryset = queryset.filter(customer=customer)
# Filter by "serialized" status?
serialized = params.get('serialized', None)