mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
And mode
This commit is contained in:
parent
72aba30e81
commit
4b41766312
@ -16,9 +16,6 @@
|
||||
The BOM for <i>{{ part.full_name }}</i> does not have complete pricing information
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class='panel panel-default'>
|
||||
Single BOM Price: {{ part.min_bom_price }} to {{ part.max_bom_price }}
|
||||
</div>
|
||||
{% if part.bom_checked_date %}
|
||||
{% if part.is_bom_valid %}
|
||||
<div class='alert alert-block alert-info'>
|
||||
|
@ -34,7 +34,7 @@ class PartIndex(ListView):
|
||||
context_object_name = 'parts'
|
||||
|
||||
def get_queryset(self):
|
||||
return Part.objects.all() # filter(category=None)
|
||||
return Part.objects.all().select_related('category')
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
|
||||
@ -355,7 +355,7 @@ class PartDetail(DetailView):
|
||||
"""
|
||||
|
||||
context_object_name = 'part'
|
||||
queryset = Part.objects.all()
|
||||
queryset = Part.objects.all().select_related('category')
|
||||
template_name = 'part/detail.html'
|
||||
|
||||
# Add in some extra context information based on query params
|
||||
@ -641,7 +641,7 @@ class CategoryDetail(DetailView):
|
||||
""" Detail view for PartCategory """
|
||||
model = PartCategory
|
||||
context_object_name = 'category'
|
||||
queryset = PartCategory.objects.all()
|
||||
queryset = PartCategory.objects.all().prefetch_related('children')
|
||||
template_name = 'part/category.html'
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user