mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-07 10:51:17 +00:00
1 parent
8fa3d77416
commit
307dd25f87
3 files changed
+4
-3
No files matched your search
@@ -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