mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 04:55:44 +00:00
Optionally auto-allocate stock items when creating a new build output
This commit is contained in:
@ -285,7 +285,21 @@ class BuildOutputCreateSerializer(serializers.Serializer):
|
||||
"""
|
||||
Generate the new build output(s)
|
||||
"""
|
||||
...
|
||||
|
||||
data = self.validated_data
|
||||
|
||||
quantity = data['quantity']
|
||||
batch_code = data.get('batch_code', '')
|
||||
auto_allocate = data.get('auto_allocate', False)
|
||||
|
||||
build = self.get_build()
|
||||
|
||||
build.create_build_output(
|
||||
quantity,
|
||||
serials=self.serials,
|
||||
batch=batch_code,
|
||||
auto_allocate=auto_allocate,
|
||||
)
|
||||
|
||||
|
||||
class BuildOutputDeleteSerializer(serializers.Serializer):
|
||||
|
Reference in New Issue
Block a user