mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 20:45:44 +00:00
Merge branch 'master' into matmair/issue2694
This commit is contained in:
@ -970,9 +970,17 @@ class SOAllocationList(generics.ListAPIView):
|
||||
outstanding = str2bool(outstanding)
|
||||
|
||||
if outstanding:
|
||||
queryset = queryset.filter(line__order__status__in=SalesOrderStatus.OPEN)
|
||||
# Filter only "open" orders
|
||||
# Filter only allocations which have *not* shipped
|
||||
queryset = queryset.filter(
|
||||
line__order__status__in=SalesOrderStatus.OPEN,
|
||||
shipment__shipment_date=None,
|
||||
)
|
||||
else:
|
||||
queryset = queryset.exclude(line__order__status__in=SalesOrderStatus.OPEN)
|
||||
queryset = queryset.exclude(
|
||||
line__order__status__in=SalesOrderStatus.OPEN,
|
||||
shipment__shipment_date=None
|
||||
)
|
||||
|
||||
return queryset
|
||||
|
||||
|
Reference in New Issue
Block a user