mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +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
|
valid = False
|
||||||
form.errors['confirm'] = [_('Confirm stock adjustment')]
|
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 = {
|
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)
|
return self.renderJsonResponse(request, form, data=data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user