StockItem serializer now includes the allocated quantity

This commit is contained in:
Oliver Walters 2020-04-22 15:24:11 +10:00
parent d9698b10cc
commit eb7b49784b

View File

@ -92,7 +92,8 @@ class StockItemSerializer(InvenTreeModelSerializer):
tracking_items = serializers.IntegerField(source='tracking_info_count', read_only=True) tracking_items = serializers.IntegerField(source='tracking_info_count', read_only=True)
allocated = serializers.BooleanField(source='is_allocated', read_only=True) quantity = serializers.FloatField()
allocated = serializers.FloatField(source='allocation_count', read_only=True)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):