diff --git a/InvenTree/part/templates/part/part_tests.html b/InvenTree/part/templates/part/part_tests.html new file mode 100644 index 0000000000..bb0dbb7683 --- /dev/null +++ b/InvenTree/part/templates/part/part_tests.html @@ -0,0 +1,29 @@ +{% extends "part/part_base.html" %} +{% load static %} +{% load i18n %} +{% block details %} + +{% include 'part/tabs.html' with tab='tests' %} + +

{% trans "Part Test Templates" %}

+
+ +
+
+
+ +
+
+ +
+
+
+ +
+ +{% endblock %} + +{% block js_ready %} +{{ block.super }} + +{% endblock %} \ No newline at end of file diff --git a/InvenTree/part/templates/part/tabs.html b/InvenTree/part/templates/part/tabs.html index b47ebfe329..28aa2cbb4d 100644 --- a/InvenTree/part/templates/part/tabs.html +++ b/InvenTree/part/templates/part/tabs.html @@ -48,7 +48,9 @@ {% trans "Sales Orders" %} {{ part.sales_orders|length }} {% endif %} - {% if 0 and part.trackable %} + {% if part.trackable %} + {% if 0 %} + {% trans "Tracking" %} {% if parts.serials.all|length > 0 %} @@ -56,6 +58,12 @@ {% endif %} {% endif %} + + {% trans "Tests" %} + {% if part.getTestTemplates.count > 0 %}{{ part.getTestTemplates.count }}{% endif %} + + + {% endif %} {% trans "Attachments" %} {% if part.attachment_count > 0 %}{{ part.attachment_count }}{% endif %} diff --git a/InvenTree/part/urls.py b/InvenTree/part/urls.py index 10db202fb9..a5aa412b24 100644 --- a/InvenTree/part/urls.py +++ b/InvenTree/part/urls.py @@ -52,6 +52,7 @@ part_detail_urls = [ url(r'^suppliers/?', views.PartDetail.as_view(template_name='part/supplier.html'), name='part-suppliers'), url(r'^orders/?', views.PartDetail.as_view(template_name='part/orders.html'), name='part-orders'), url(r'^sales-orders/', views.PartDetail.as_view(template_name='part/sales_orders.html'), name='part-sales-orders'), + url(r'^tests/', views.PartDetail.as_view(template_name='part/part_tests.html'), name='part-test-templates'), url(r'^track/?', views.PartDetail.as_view(template_name='part/track.html'), name='part-track'), url(r'^attachments/?', views.PartDetail.as_view(template_name='part/attachments.html'), name='part-attachments'), url(r'^notes/?', views.PartNotes.as_view(), name='part-notes'), diff --git a/InvenTree/stock/templates/stock/item_tests.html b/InvenTree/stock/templates/stock/item_tests.html index 6621637f1f..bd16ee8d29 100644 --- a/InvenTree/stock/templates/stock/item_tests.html +++ b/InvenTree/stock/templates/stock/item_tests.html @@ -13,7 +13,7 @@
- +
diff --git a/InvenTree/stock/templates/stock/tabs.html b/InvenTree/stock/templates/stock/tabs.html index 5ec75ddc28..1e6e9ddb3b 100644 --- a/InvenTree/stock/templates/stock/tabs.html +++ b/InvenTree/stock/templates/stock/tabs.html @@ -10,7 +10,7 @@ {% if item.part.trackable %} - {% trans "Test Results" %} + {% trans "Test Data" %} {% if item.test_results.count > 0 %}{{ item.test_results.count }}{% endif %}