From 5f4275679d4ec076e903d0d856b1aded8e796c98 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 26 May 2024 20:54:45 +1000 Subject: [PATCH] PUI: Don't load stock test results for non-trackable part (#7327) (#7337) (cherry picked from commit e8e64616da22300f501553eae38e9d711eb0d52d) Co-authored-by: Oliver --- src/backend/InvenTree/stock/templates/stock/item.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/InvenTree/stock/templates/stock/item.html b/src/backend/InvenTree/stock/templates/stock/item.html index 33810b6da6..1d46c3bd8b 100644 --- a/src/backend/InvenTree/stock/templates/stock/item.html +++ b/src/backend/InvenTree/stock/templates/stock/item.html @@ -233,6 +233,7 @@ {% settings_value "TEST_STATION_DATA" as test_station_fields %} + {% if item.part.trackable %} loadStockTestResultsTable( $("#test-result-table"), { part: {{ item.part.id }}, @@ -248,6 +249,7 @@ url: '{% url "api-stockitem-testreport-list" %}', }); }); + {% endif %} {% if user.is_staff %} $("#delete-test-results").click(function() {