Add functions to install and uninstall stock items

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

No files matched your search

+3 -1
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')