mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-20 02:15:53 +00:00
Added update endpoints for StockItem
- Stocktake - Take-Stock
This commit is contained in:
@@ -17,10 +17,22 @@ class StockItemSerializer(serializers.HyperlinkedModelSerializer):
|
||||
'status',
|
||||
'notes',
|
||||
'updated',
|
||||
'last_checked',
|
||||
'stocktake_date',
|
||||
'review_needed',
|
||||
'expected_arrival')
|
||||
|
||||
""" These fields are read-only in this context.
|
||||
They can be updated by accessing the appropriate API endpoints
|
||||
"""
|
||||
read_only_fields = ('stocktake_date', 'quantity',)
|
||||
|
||||
|
||||
class StockQuantitySerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = StockItem
|
||||
fields = ('quantity',)
|
||||
|
||||
|
||||
class LocationSerializer(serializers.HyperlinkedModelSerializer):
|
||||
""" Detailed information about a stock location
|
||||
|
Reference in New Issue
Block a user