mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Return message on succses
This commit is contained in:
parent
20963f83d9
commit
96f6f6068e
@ -251,8 +251,18 @@ class StockItemMoveMultiple(AjaxView, FormMixin):
|
||||
valid = False
|
||||
form.errors['confirm'] = [_('Confirm stock adjustment')]
|
||||
|
||||
try:
|
||||
destination = StockLocation.objects.get(id=form['destination'].value())
|
||||
destination_name = destination.pathstring
|
||||
except StockLocation.DoesNotExist:
|
||||
destination = None
|
||||
destination_name = ""
|
||||
|
||||
data = {
|
||||
'form_valid': False,
|
||||
'form_valid': valid,
|
||||
'success': _('Moved {n} items to {loc}'.format(
|
||||
n=len(self.stock_items),
|
||||
loc=destination_name))
|
||||
}
|
||||
|
||||
return self.renderJsonResponse(request, form, data=data)
|
||||
|
Loading…
Reference in New Issue
Block a user