mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
parent
8fa3d77416
commit
307dd25f87
@ -168,6 +168,10 @@ class Company(models.Model):
|
|||||||
""" The number of parts manufactured (or supplied) by this Company """
|
""" The number of parts manufactured (or supplied) by this Company """
|
||||||
return self.parts.count()
|
return self.parts.count()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def has_parts(self):
|
||||||
|
return self.part_count > 0
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def stock_items(self):
|
def stock_items(self):
|
||||||
""" Return a list of all stock items supplied or manufactured by this company """
|
""" Return a list of all stock items supplied or manufactured by this company """
|
||||||
|
@ -77,7 +77,6 @@ class CompanyIndex(ListView):
|
|||||||
context = None
|
context = None
|
||||||
|
|
||||||
for item in lookup:
|
for item in lookup:
|
||||||
print(self.request.path, item)
|
|
||||||
if self.request.path == item:
|
if self.request.path == item:
|
||||||
context = lookup[item]
|
context = lookup[item]
|
||||||
break
|
break
|
||||||
|
@ -1268,8 +1268,6 @@ class PartExport(AjaxView):
|
|||||||
# Filter by part category
|
# Filter by part category
|
||||||
cat_id = request.GET.get('category', None)
|
cat_id = request.GET.get('category', None)
|
||||||
|
|
||||||
print('cat_id:', cat_id)
|
|
||||||
|
|
||||||
part_list = None
|
part_list = None
|
||||||
|
|
||||||
if cat_id is not None:
|
if cat_id is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user