diff --git a/InvenTree/build/forms.py b/InvenTree/build/forms.py index 24f193865d..ba7787798d 100644 --- a/InvenTree/build/forms.py +++ b/InvenTree/build/forms.py @@ -66,7 +66,7 @@ class BuildOutputCreateForm(HelperForm): 'serial_numbers': 'fa-hashtag', } - quantity = forms.IntegerField( + output_quantity = forms.IntegerField( label=_('Quantity'), help_text=_('Enter quantity for build output'), ) @@ -86,7 +86,7 @@ class BuildOutputCreateForm(HelperForm): class Meta: model = Build fields = [ - 'quantity', + 'output_quantity', 'batch', 'serial_numbers', 'confirm', diff --git a/InvenTree/build/views.py b/InvenTree/build/views.py index 5dd36a6871..1355738a9c 100644 --- a/InvenTree/build/views.py +++ b/InvenTree/build/views.py @@ -188,7 +188,7 @@ class BuildOutputCreate(AjaxUpdateView): Validation for the form: """ - quantity = form.cleaned_data.get('quantity', None) + quantity = form.cleaned_data.get('output_quantity', None) serials = form.cleaned_data.get('serial_numbers', None) # Check that the serial numbers are valid @@ -222,7 +222,7 @@ class BuildOutputCreate(AjaxUpdateView): data = form.cleaned_data - quantity = data.get('quantity', None) + quantity = data.get('output_quantity', None) batch = data.get('batch', None) serials = data.get('serial_numbers', None)