mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
commit
2948dad831
@ -478,6 +478,23 @@ class StockList(generics.ListCreateAPIView):
|
||||
|
||||
if sales_order:
|
||||
queryset = queryset.filter(sales_order=sales_order)
|
||||
|
||||
# Filter by "serialized" status?
|
||||
serialized = params.get('serialized', None)
|
||||
|
||||
if serialized is not None:
|
||||
serialized = str2bool(serialized)
|
||||
|
||||
if serialized:
|
||||
queryset = queryset.exclude(serial=None)
|
||||
else:
|
||||
queryset = queryset.filter(serial=None)
|
||||
|
||||
# Filter by serial number?
|
||||
serial_number = params.get('serial', None)
|
||||
|
||||
if serial_number is not None:
|
||||
queryset = queryset.filter(serial=serial_number)
|
||||
|
||||
in_stock = self.request.query_params.get('in_stock', None)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user