mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 21:15:41 +00:00
@ -168,6 +168,10 @@ class Company(models.Model):
|
||||
""" The number of parts manufactured (or supplied) by this Company """
|
||||
return self.parts.count()
|
||||
|
||||
@property
|
||||
def has_parts(self):
|
||||
return self.part_count > 0
|
||||
|
||||
@property
|
||||
def stock_items(self):
|
||||
""" Return a list of all stock items supplied or manufactured by this company """
|
||||
|
@ -77,7 +77,6 @@ class CompanyIndex(ListView):
|
||||
context = None
|
||||
|
||||
for item in lookup:
|
||||
print(self.request.path, item)
|
||||
if self.request.path == item:
|
||||
context = lookup[item]
|
||||
break
|
||||
|
Reference in New Issue
Block a user