mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-02 13:28:49 +00:00
Fix issue with shadowed form field
- Rename "quantity" to "output_quantity" to address this
This commit is contained in:
parent
8b7789cdb3
commit
d44092b209
@ -66,7 +66,7 @@ class BuildOutputCreateForm(HelperForm):
|
|||||||
'serial_numbers': 'fa-hashtag',
|
'serial_numbers': 'fa-hashtag',
|
||||||
}
|
}
|
||||||
|
|
||||||
quantity = forms.IntegerField(
|
output_quantity = forms.IntegerField(
|
||||||
label=_('Quantity'),
|
label=_('Quantity'),
|
||||||
help_text=_('Enter quantity for build output'),
|
help_text=_('Enter quantity for build output'),
|
||||||
)
|
)
|
||||||
@ -86,7 +86,7 @@ class BuildOutputCreateForm(HelperForm):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = Build
|
model = Build
|
||||||
fields = [
|
fields = [
|
||||||
'quantity',
|
'output_quantity',
|
||||||
'batch',
|
'batch',
|
||||||
'serial_numbers',
|
'serial_numbers',
|
||||||
'confirm',
|
'confirm',
|
||||||
|
@ -188,7 +188,7 @@ class BuildOutputCreate(AjaxUpdateView):
|
|||||||
Validation for the form:
|
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)
|
serials = form.cleaned_data.get('serial_numbers', None)
|
||||||
|
|
||||||
# Check that the serial numbers are valid
|
# Check that the serial numbers are valid
|
||||||
@ -222,7 +222,7 @@ class BuildOutputCreate(AjaxUpdateView):
|
|||||||
|
|
||||||
data = form.cleaned_data
|
data = form.cleaned_data
|
||||||
|
|
||||||
quantity = data.get('quantity', None)
|
quantity = data.get('output_quantity', None)
|
||||||
batch = data.get('batch', None)
|
batch = data.get('batch', None)
|
||||||
|
|
||||||
serials = data.get('serial_numbers', None)
|
serials = data.get('serial_numbers', None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user