mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b705f3c62a
@ -181,10 +181,14 @@ class StockItem(models.Model):
|
|||||||
self.add_stock(-amount)
|
self.add_stock(-amount)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "{n} x {part} @ {loc}".format(
|
s = '{n} x {part}'.format(
|
||||||
n=self.quantity,
|
n=self.quantity,
|
||||||
part=self.part.name,
|
part=self.part.name)
|
||||||
loc=self.location.name)
|
|
||||||
|
if self.location:
|
||||||
|
s += ' @ {loc}'.format(loc=self.location.name)
|
||||||
|
|
||||||
|
return s
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_trackable(self):
|
def is_trackable(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user