2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 04:00:57 +00:00

Include supplier-part information in Stock API

This commit is contained in:
Oliver Walters
2020-04-06 22:02:23 +10:00
parent 5956b8cdee
commit 96547b885e
3 changed files with 20 additions and 1 deletions

View File

@ -410,9 +410,13 @@ class StockItem(MPTTModel):
return True
@property
def tracking_info_count(self):
return self.tracking_info.count()
@property
def has_tracking_info(self):
return self.tracking_info.count() > 0
return self.tracking_info_count > 0
def addTransactionNote(self, title, user, notes='', url='', system=True):
""" Generation a stock transaction note for this item.