-
-
-
-{% include "build/build_list.html" with builds=active title="Active Builds" completed=False collapse_id='active' %}
-
-{% include "build/build_list.html" with builds=completed completed=True title="Completed Builds" collapse_id="complete" %}
-
-{% include "build/build_list.html" with builds=cancelled title="Cancelled Builds" completed=False collapse_id="cancelled" %}
+
{% endblock %}
@@ -38,38 +40,18 @@ InvenTree | Build List
$("#new-build").click(function() {
launchModalForm(
- "{% url 'build-create' %}",
- {
- follow: true
- });
+ "{% url 'build-create' %}",
+ {
+ follow: true
+ }
+ );
});
- $(".build-table").inventreeTable({
- formatNoMatches: function() { return 'No builds found'; },
- columns: [
- {
- field: 'name',
- title: 'Build',
- sortable: true,
- },
- {
- field: 'part',
- title: 'Part',
- sortable: true,
- },
- {
- title: 'Quantity',
- sortable: true,
- searchable: false
- },
- {
- title: 'Status',
- sortable: true,
- },
- {
- sortable: true,
- },
- ]
+ loadBuildTable($("#build-table"), {
+ url: "{% url 'api-build-list' %}",
+ params: {
+ part_detail: "true",
+ },
});
{% endblock %}
\ No newline at end of file
diff --git a/InvenTree/build/tests.py b/InvenTree/build/tests.py
index 06eafa41ab..acd614425a 100644
--- a/InvenTree/build/tests.py
+++ b/InvenTree/build/tests.py
@@ -143,9 +143,7 @@ class TestBuildViews(TestCase):
content = str(response.content)
- # Content should contain build titles
- for build in Build.objects.all():
- self.assertIn(build.title, content)
+ self.assertIn("Part Builds", content)
def test_build_detail(self):
""" Test the detail view for a Build object """
diff --git a/InvenTree/company/templates/company/detail_part.html b/InvenTree/company/templates/company/detail_part.html
index 83c565943c..46ec09ffc6 100644
--- a/InvenTree/company/templates/company/detail_part.html
+++ b/InvenTree/company/templates/company/detail_part.html
@@ -30,21 +30,21 @@
$("#part-create").click(function () {
launchModalForm(
- "{% url 'supplier-part-create' %}",
- {
- data: {
- supplier: {{ company.id }}
- },
- reload: true,
- secondary: [
- {
- field: 'part',
- label: 'New Part',
- title: 'Create New Part',
- url: "{% url 'part-create' %}"
- },
- ]
- });
+ "{% url 'supplier-part-create' %}",
+ {
+ data: {
+ supplier: {{ company.id }}
+ },
+ reload: true,
+ secondary: [
+ {
+ field: 'part',
+ label: 'New Part',
+ title: 'Create New Part',
+ url: "{% url 'part-create' %}"
+ },
+ ]
+ });
});
$("#part-table").inventreeTable({
@@ -64,7 +64,22 @@
field: 'part_detail.full_name',
title: '{% trans "Part" %}',
formatter: function(value, row, index, field) {
- return imageHoverIcon(row.part_detail.image_url) + renderLink(value, '/part/' + row.part + '/suppliers/');
+
+ var html = imageHoverIcon(row.part_detail.thumbnail) + renderLink(value, '/part/' + row.part + '/suppliers/');
+
+ if (row.part_detail.is_template) {
+ html += `
`;
+ }
+
+ if (row.part_detail.assembly) {
+ html += `
`;
+ }
+
+ if (!row.part_detail.active) {
+ html += `
INACTIVE`;
+ }
+
+ return html;
}
},
{
diff --git a/InvenTree/company/templates/company/detail_purchase_orders.html b/InvenTree/company/templates/company/detail_purchase_orders.html
index c3878eec6d..7113297b0c 100644
--- a/InvenTree/company/templates/company/detail_purchase_orders.html
+++ b/InvenTree/company/templates/company/detail_purchase_orders.html
@@ -9,8 +9,11 @@