diff --git a/InvenTree/company/models.py b/InvenTree/company/models.py index 66089dacb9..7ebd36427b 100644 --- a/InvenTree/company/models.py +++ b/InvenTree/company/models.py @@ -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 """ diff --git a/InvenTree/company/views.py b/InvenTree/company/views.py index e7bb2eaf57..d1fc9b643f 100644 --- a/InvenTree/company/views.py +++ b/InvenTree/company/views.py @@ -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 diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 8f1311b96a..b36d097185 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -1268,8 +1268,6 @@ class PartExport(AjaxView): # Filter by part category cat_id = request.GET.get('category', None) - print('cat_id:', cat_id) - part_list = None if cat_id is not None: