mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-05 21:20:56 +00:00
remove from stock now works
This commit is contained in:
@ -277,7 +277,7 @@ class StockAdjust(AjaxView, FormMixin):
|
||||
valid = False
|
||||
continue
|
||||
|
||||
if self.stock_action in ['move']:
|
||||
if self.stock_action in ['move', 'take']:
|
||||
|
||||
if item.new_quantity > item.quantity:
|
||||
item.error = _('Quantity must not exceed {x}'.format(x=item.quantity))
|
||||
@ -351,6 +351,8 @@ class StockAdjust(AjaxView, FormMixin):
|
||||
if item.new_quantity <= 0:
|
||||
continue
|
||||
|
||||
item.take_stock(item.new_quantity, self.request.user, notes=note)
|
||||
|
||||
count += 1
|
||||
|
||||
return _("Removed stock from {n} items".format(n=count))
|
||||
|
Reference in New Issue
Block a user