2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-04 20:51:00 +00:00

Add functions to install and uninstall stock items

This commit is contained in:
Oliver Walters
2020-09-28 21:52:23 +10:00
parent 81ce284264
commit df8d1fb32b
3 changed files with 64 additions and 1 deletions

View File

@ -774,6 +774,8 @@ class StockItemUninstall(AjaxView, FormMixin):
confirmed = str2bool(request.POST.get('confirm'))
note = request.POST.get('note', '')
location = request.POST.get('location', None)
if location:
@ -799,7 +801,7 @@ class StockItemUninstall(AjaxView, FormMixin):
if valid:
# Ok, now let's actually uninstall the stock items
for item in self.stock_items:
pass
item.uninstallIntoLocation(location, request.user, note)
data['success'] = _('Uninstalled stock items')