diff --git a/InvenTree/stock/serializers.py b/InvenTree/stock/serializers.py index 14fe043564..f84667e352 100644 --- a/InvenTree/stock/serializers.py +++ b/InvenTree/stock/serializers.py @@ -119,6 +119,8 @@ class LocationSerializer(InvenTreeModelSerializer): url = serializers.CharField(source='get_absolute_url', read_only=True) + items = serializers.IntegerField(source='item_count', read_only=True) + class Meta: model = StockLocation fields = [ @@ -127,7 +129,8 @@ class LocationSerializer(InvenTreeModelSerializer): 'name', 'description', 'parent', - 'pathstring' + 'pathstring', + 'items', ]