2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 11:05:41 +00:00

Stock counting now works

This commit is contained in:
Oliver Walters
2019-06-02 12:20:26 +10:00
parent d365d7cc44
commit 2ee35ec062
3 changed files with 14 additions and 7 deletions

View File

@ -358,7 +358,17 @@ class StockAdjust(AjaxView, FormMixin):
return _("Removed stock from {n} items".format(n=count))
def do_count(self):
pass
count = 0
note = self.request.POST['note']
for item in self.stock_items:
item.stocktake(item.new_quantity, self.request.user, notes=note)
count += 1
return _("Counted stock for {n} items".format(n=count))
def do_move(self, destination):
""" Perform actual stock movement """