mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-11 07:24:15 +00:00
Add API LIST endpoint for SalesOrderAllocations
This commit is contained in:
@ -236,11 +236,12 @@ class SalesOrderAllocationSerializer(InvenTreeModelSerializer):
|
||||
This includes some fields from the related model objects.
|
||||
"""
|
||||
|
||||
location_path = serializers.CharField(source='get_location_path')
|
||||
location_id = serializers.IntegerField(source='get_location')
|
||||
serial = serializers.CharField(source='get_serial')
|
||||
po = serializers.CharField(source='get_po')
|
||||
quantity = serializers.FloatField()
|
||||
location_path = serializers.CharField(source='get_location_path', read_only=True)
|
||||
location = serializers.IntegerField(source='get_location', read_only=True)
|
||||
part = serializers.PrimaryKeyRelatedField(source='item.part', read_only=True)
|
||||
order = serializers.PrimaryKeyRelatedField(source='line.order', many=False, read_only=True)
|
||||
serial = serializers.CharField(source='get_serial', read_only=True)
|
||||
quantity = serializers.FloatField(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = SalesOrderAllocation
|
||||
@ -250,9 +251,10 @@ class SalesOrderAllocationSerializer(InvenTreeModelSerializer):
|
||||
'line',
|
||||
'serial',
|
||||
'quantity',
|
||||
'location_id',
|
||||
'order',
|
||||
'part',
|
||||
'location',
|
||||
'location_path',
|
||||
'po',
|
||||
'item',
|
||||
]
|
||||
|
||||
|
Reference in New Issue
Block a user