mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 12:35:46 +00:00
[PUI] Fix Build Output Forms (#8184)
* Enhancements for stock item form * Edit stock item from "build output" table * Rearrange menu items * Fix build order line complete action * Fix for other modals * Cleanup dead code * Reload build details after output state change * Logic fix for plugin table * Bump API version * Adds hook for generating placeholder serial numbers * Add playwright tests * Remove unused imports * Cleanup playwright tests
This commit is contained in:
@ -1,13 +1,16 @@
|
||||
"""InvenTree API version information."""
|
||||
|
||||
# InvenTree API version
|
||||
INVENTREE_API_VERSION = 260
|
||||
INVENTREE_API_VERSION = 261
|
||||
|
||||
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
|
||||
|
||||
|
||||
INVENTREE_API_TEXT = """
|
||||
|
||||
261 - 2024-09;26 : https://github.com/inventree/InvenTree/pull/8184
|
||||
- Fixes for BuildOrder API serializers
|
||||
|
||||
v260 - 2024-09-26 : https://github.com/inventree/InvenTree/pull/8190
|
||||
- Adds facility for server-side context data to be passed to client-side plugins
|
||||
|
||||
|
@ -555,7 +555,7 @@ class BuildOutputCompleteSerializer(serializers.Serializer):
|
||||
fields = [
|
||||
'outputs',
|
||||
'location',
|
||||
'status',
|
||||
'status_custom_key',
|
||||
'accept_incomplete_allocation',
|
||||
'notes',
|
||||
]
|
||||
@ -573,7 +573,7 @@ class BuildOutputCompleteSerializer(serializers.Serializer):
|
||||
help_text=_("Location for completed build outputs"),
|
||||
)
|
||||
|
||||
status = serializers.ChoiceField(
|
||||
status_custom_key = serializers.ChoiceField(
|
||||
choices=StockStatus.items(),
|
||||
default=StockStatus.OK.value,
|
||||
label=_("Status"),
|
||||
@ -621,8 +621,8 @@ class BuildOutputCompleteSerializer(serializers.Serializer):
|
||||
|
||||
data = self.validated_data
|
||||
|
||||
location = data['location']
|
||||
status = data['status']
|
||||
location = data.get('location', None)
|
||||
status = data.get('status_custom_key', StockStatus.OK.value)
|
||||
notes = data.get('notes', '')
|
||||
|
||||
outputs = data.get('outputs', [])
|
||||
|
Reference in New Issue
Block a user