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

Deleted extraneous form code

This commit is contained in:
Oliver
2018-04-30 00:59:36 +10:00
parent 39530831d8
commit bee760d184
6 changed files with 66 additions and 95 deletions

View File

@ -166,6 +166,16 @@ class StockItem(models.Model):
infinite = models.BooleanField(default=False)
@property
def in_stock(self):
if self.quantity == 0:
return False
if self.belongs_to or self.customer:
return False
return True
@property
def has_tracking_info(self):
return self.tracking_info.count() > 0