mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Bug fix
This commit is contained in:
parent
3058b895dd
commit
42e1370e92
@ -322,7 +322,7 @@ class StockItem(models.Model):
|
|||||||
- Is installed inside another StockItem
|
- 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 False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
@ -383,8 +383,8 @@ class StockAdjust(AjaxView, FormMixin):
|
|||||||
if item.new_quantity <= 0:
|
if item.new_quantity <= 0:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Do not move to the same location
|
# Do not move to the same location (unless the quantity is different)
|
||||||
if destination == item.location:
|
if destination == item.location and item.new_quantity == item.quantity:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
item.move(destination, note, self.request.user, quantity=int(item.new_quantity))
|
item.move(destination, note, self.request.user, quantity=int(item.new_quantity))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user