Fix incorrect value for "available stock"

This commit is contained in:
Oliver Walters 2022-04-02 11:13:43 +11:00
parent 4593b0f412
commit 0ab2ff306c

View File

@ -1345,7 +1345,8 @@ class Part(MPTTModel):
queryset = OrderModels.SalesOrderAllocation.objects.filter(item__part__id=self.id)
pending = kwargs.get('pending', None)
# Default behaviour is to only return *pending* allocations
pending = kwargs.get('pending', True)
if pending is True:
# Look only for 'open' orders which have not shipped