2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-20 02:15:53 +00:00

API improvements for Stock app

This commit is contained in:
Oliver Walters
2017-04-14 12:54:34 +10:00
parent 2299cd0700
commit 0441eb4c38
3 changed files with 76 additions and 29 deletions

View File

@@ -35,18 +35,10 @@ class LocationDetailSerializer(serializers.ModelSerializer):
""" Detailed information about a stock location
"""
# List of all stock items in this location
items = StockItemSerializer(many=True, read_only=True)
# List of all child locations under this one
children = LocationBriefSerializer(many=True, read_only=True)
class Meta:
model = StockLocation
fields = ('pk',
'name',
'description',
'parent',
'path',
'children',
'items')
'path')