Merge remote-tracking branch 'origin/master'

This commit is contained in:
Oliver 2018-04-27 22:51:17 +10:00
commit b705f3c62a

View File

@ -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):