diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index d60356ea8e..f77550b609 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -181,10 +181,14 @@ class StockItem(models.Model): self.add_stock(-amount) def __str__(self): - return "{n} x {part} @ {loc}".format( - n=self.quantity, - part=self.part.name, - loc=self.location.name) + s = '{n} x {part}'.format( + n=self.quantity, + part=self.part.name) + + if self.location: + s += ' @ {loc}'.format(loc=self.location.name) + + return s @property def is_trackable(self):