2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 20:45:44 +00:00

Set serial numbers when creating a new stock item

This commit is contained in:
Oliver Walters
2019-07-23 10:31:34 +10:00
parent 23d03d6b9b
commit 9e5eadd6c3
6 changed files with 105 additions and 23 deletions

View File

@ -282,10 +282,9 @@ class BuildComplete(AjaxUpdateView):
if len(existing) > 0:
exists = ",".join([str(x) for x in existing])
form.errors['serial_numbers'] = [_('The following serial numbers already exist: {sn}'.format(sn=exists))]
form.errors['serial_numbers'] = [_('The following serial numbers already exist: ({sn})'.format(sn=exists))]
valid = False
except ValidationError as e:
form.errors['serial_numbers'] = e.messages
valid = False