This commit is contained in:
Oliver Walters 2019-07-25 10:36:59 +10:00
parent 3058b895dd
commit 42e1370e92
2 changed files with 3 additions and 3 deletions

View File

@ -322,7 +322,7 @@ class StockItem(models.Model):
- Is installed inside another StockItem
"""
if part.trackable and self.serial is not None:
if self.part.trackable and self.serial is not None:
return False
return True

View File

@ -383,8 +383,8 @@ class StockAdjust(AjaxView, FormMixin):
if item.new_quantity <= 0:
continue
# Do not move to the same location
if destination == item.location:
# Do not move to the same location (unless the quantity is different)
if destination == item.location and item.new_quantity == item.quantity:
continue
item.move(destination, note, self.request.user, quantity=int(item.new_quantity))