mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Cleanup errors in unit testing
This commit is contained in:
parent
ae55c81dae
commit
d348d90fbe
@ -1273,7 +1273,7 @@ class POLineItemEdit(AjaxUpdateView):
|
|||||||
form = super().get_form()
|
form = super().get_form()
|
||||||
|
|
||||||
# Prevent user from editing order once line item is assigned
|
# Prevent user from editing order once line item is assigned
|
||||||
form.fields.pop('order')
|
form.fields['order'].widget = HiddenInput()
|
||||||
|
|
||||||
return form
|
return form
|
||||||
|
|
||||||
|
@ -1170,8 +1170,9 @@ class StockItemEdit(AjaxUpdateView):
|
|||||||
query = query.filter(part=item.part.id)
|
query = query.filter(part=item.part.id)
|
||||||
form.fields['supplier_part'].queryset = query
|
form.fields['supplier_part'].queryset = query
|
||||||
|
|
||||||
if not item.part.trackable or not item.serialized:
|
# Hide the serial number field if it is not required
|
||||||
form.fields.pop('serial')
|
if not item.part.trackable and not item.serialized:
|
||||||
|
form.fields['serial'].widget = HiddenInput()
|
||||||
|
|
||||||
return form
|
return form
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user