2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

Bugfix: Turns out 'prefix' and 'suffix' were protected fields!

This commit is contained in:
Oliver Walters
2020-05-16 11:05:45 +10:00
parent 08d177e55f
commit 498ad4162c
4 changed files with 40 additions and 18 deletions

View File

@ -108,11 +108,11 @@ class SerializeStockForm(HelperForm):
else:
sn = str(sn)
self.prefix = {
self.field_prefix = {
'serial_numbers': 'fa-hashtag',
}
self.placeholder = {
self.field_placeholder = {
'serial_numbers': sn
}

View File

@ -717,7 +717,7 @@ class StockItemEdit(AjaxUpdateView):
query = query.filter(part=item.part.id)
form.fields['supplier_part'].queryset = query
if not item.part.trackable:
if not item.part.trackable or not item.serialized:
form.fields.pop('serial')
return form