From 42e1370e92d1853768477d33e88a32fe3bf602fb Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 25 Jul 2019 10:36:59 +1000 Subject: [PATCH] Bug fix --- InvenTree/stock/models.py | 2 +- InvenTree/stock/views.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index c92776a2fa..abc4702e4a 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -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 diff --git a/InvenTree/stock/views.py b/InvenTree/stock/views.py index 7595c550b0..b7fbb9f9e4 100644 --- a/InvenTree/stock/views.py +++ b/InvenTree/stock/views.py @@ -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))