made the stock view more ugly by adding badges showing the number of stored parts, lots and substorages

This commit is contained in:
2025-01-28 22:38:17 +01:00
parent aefcc472ea
commit 6ae94e9ea4
4 changed files with 32 additions and 8 deletions

View File

@@ -76,7 +76,7 @@ class StockViewDetail(LoginRequiredMixin, BaseTemplateMixin, DetailView):
def search_stock_queryset(self, search):
if self.object.expand_sub_storage_stocks:
stocks_in_storage = Stock.objects.filter(storage__in=self.object.get_tree())
stocks_in_storage = Stock.objects.filter(storage__in=self.object.get_storage_list())
else:
stocks_in_storage = Stock.objects.filter(storage=self.object)