mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-20 22:06:28 +00:00
Merge branch 'master' of git://github.com/inventree/InvenTree into parametric_part_tables
This commit is contained in:
@ -430,6 +430,17 @@ class PartList(generics.ListCreateAPIView):
|
||||
except (ValueError, Part.DoesNotExist):
|
||||
pass
|
||||
|
||||
# Filter by whether the part has an IPN (internal part number) defined
|
||||
has_ipn = params.get('has_ipn', None)
|
||||
|
||||
if has_ipn is not None:
|
||||
has_ipn = str2bool(has_ipn)
|
||||
|
||||
if has_ipn:
|
||||
queryset = queryset.exclude(IPN='')
|
||||
else:
|
||||
queryset = queryset.filter(IPN='')
|
||||
|
||||
# Filter by whether the BOM has been validated (or not)
|
||||
bom_valid = params.get('bom_valid', None)
|
||||
|
||||
|
@ -7,7 +7,12 @@
|
||||
<div class='row'>
|
||||
<div class='col-sm-6'>
|
||||
{% if category %}
|
||||
<h3>{{ category.name }}</h3>
|
||||
<h3>
|
||||
{{ category.name }}
|
||||
{% if user.is_staff and perms.part.change_partcategory %}
|
||||
<a href="{% url 'admin:part_partcategory_change' category.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
|
||||
{% endif %}
|
||||
</h3>
|
||||
<p>{{ category.description }}</p>
|
||||
{% else %}
|
||||
<h3>{% trans "Part Categories" %}</h3>
|
||||
@ -109,9 +114,9 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='filter-list' id='filter-list-parts'>
|
||||
<!-- Empty div -->
|
||||
</div>
|
||||
</div>
|
||||
<div class='filter-list' id='filter-list-parts'>
|
||||
<!-- Empty div -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -28,6 +28,9 @@
|
||||
<div class="media-body">
|
||||
<h3>
|
||||
{{ part.full_name }}
|
||||
{% if user.is_staff and perms.part.change_part %}
|
||||
<a href="{% url 'admin:part_part_change' part.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
|
||||
{% endif %}
|
||||
{% if not part.active %}
|
||||
<div class='label label-large label-large-red'>
|
||||
{% trans 'Inactive' %}
|
||||
|
Reference in New Issue
Block a user