mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-12 10:05:39 +00:00
Changed some category views to use boostrap list-group
- Looks much fancier!
This commit is contained in:
@ -20,6 +20,20 @@ class PartCategory(InvenTreeTree):
|
||||
verbose_name = "Part Category"
|
||||
verbose_name_plural = "Part Categories"
|
||||
|
||||
|
||||
@property
|
||||
def partcount(self):
|
||||
""" Return the total part count under this category
|
||||
(including children of child categories)
|
||||
"""
|
||||
|
||||
count = self.parts.count()
|
||||
|
||||
for child in self.children.all():
|
||||
count += child.partcount
|
||||
|
||||
return count
|
||||
|
||||
"""
|
||||
@property
|
||||
def parts(self):
|
||||
|
Reference in New Issue
Block a user