mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Ref: https://github.com/inventree/InvenTree/discussions/7314
(cherry picked from commit 0d46af7a74
)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
9cebfa85df
commit
9eccf69456
@ -237,6 +237,16 @@ class BuildOutputCreateSerializer(serializers.Serializer):
|
||||
The Build object is provided to the serializer context.
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
"""Serializer metaclass."""
|
||||
fields = [
|
||||
'quantity',
|
||||
'batch_code',
|
||||
'serial_numbers',
|
||||
'location',
|
||||
'auto_allocate',
|
||||
]
|
||||
|
||||
quantity = serializers.DecimalField(
|
||||
max_digits=15,
|
||||
decimal_places=5,
|
||||
@ -639,6 +649,14 @@ class OverallocationChoice():
|
||||
class BuildCompleteSerializer(serializers.Serializer):
|
||||
"""DRF serializer for marking a BuildOrder as complete."""
|
||||
|
||||
class Meta:
|
||||
"""Serializer metaclass"""
|
||||
fields = [
|
||||
'accept_overallocated',
|
||||
'accept_unallocated',
|
||||
'accept_incomplete',
|
||||
]
|
||||
|
||||
def get_context_data(self):
|
||||
"""Retrieve extra context data for this serializer.
|
||||
|
||||
@ -732,6 +750,13 @@ class BuildUnallocationSerializer(serializers.Serializer):
|
||||
- bom_item: Filter against a particular BOM line item
|
||||
"""
|
||||
|
||||
class Meta:
|
||||
"""Serializer metaclass"""
|
||||
fields = [
|
||||
'build_line',
|
||||
'output',
|
||||
]
|
||||
|
||||
build_line = serializers.PrimaryKeyRelatedField(
|
||||
queryset=BuildLine.objects.all(),
|
||||
many=False,
|
||||
|
Loading…
Reference in New Issue
Block a user