From eaf191dc8dc19a36f9c5d2f1f86b82f617aeb914 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 4 Jul 2021 23:45:04 +0200 Subject: [PATCH] fetching supplier part for stock tables --- InvenTree/build/templates/build/build_output.html | 1 + InvenTree/company/templates/company/assigned_stock.html | 1 + InvenTree/company/templates/company/detail_stock.html | 1 + InvenTree/company/templates/company/supplier_part_stock.html | 1 + InvenTree/order/templates/order/po_received_items.html | 1 + InvenTree/stock/templates/stock/item_childs.html | 1 + InvenTree/stock/templates/stock/location.html | 1 + InvenTree/templates/InvenTree/index.html | 3 +++ 8 files changed, 10 insertions(+) diff --git a/InvenTree/build/templates/build/build_output.html b/InvenTree/build/templates/build/build_output.html index 00d7c5d5d2..d3863a2e04 100644 --- a/InvenTree/build/templates/build/build_output.html +++ b/InvenTree/build/templates/build/build_output.html @@ -72,6 +72,7 @@ loadStockTable($("#stock-table"), { params: { location_detail: true, part_detail: true, + supplier_part_detail: true, build: {{ build.id }}, }, groupByField: 'location', diff --git a/InvenTree/company/templates/company/assigned_stock.html b/InvenTree/company/templates/company/assigned_stock.html index d64719407b..50b48b283f 100644 --- a/InvenTree/company/templates/company/assigned_stock.html +++ b/InvenTree/company/templates/company/assigned_stock.html @@ -29,6 +29,7 @@ loadStockTable($("#stock-table"), { params: { customer: {{ company.id }}, part_detail: true, + supplier_part_detail: true, location_detail: true, }, url: "{% url 'api-stock-list' %}", diff --git a/InvenTree/company/templates/company/detail_stock.html b/InvenTree/company/templates/company/detail_stock.html index f10a99ba5a..d61dd05954 100644 --- a/InvenTree/company/templates/company/detail_stock.html +++ b/InvenTree/company/templates/company/detail_stock.html @@ -24,6 +24,7 @@ company: {{ company.id }}, part_detail: true, supplier_detail: true, + supplier_part_detail: true, location_detail: true, }, buttons: [ diff --git a/InvenTree/company/templates/company/supplier_part_stock.html b/InvenTree/company/templates/company/supplier_part_stock.html index 1187b95bca..73028f9d91 100644 --- a/InvenTree/company/templates/company/supplier_part_stock.html +++ b/InvenTree/company/templates/company/supplier_part_stock.html @@ -23,6 +23,7 @@ supplier_part: {{ part.id }}, location_detail: true, part_detail: false, + supplier_part_detail: true, }, groupByField: 'location', buttons: ['#stock-options'], diff --git a/InvenTree/order/templates/order/po_received_items.html b/InvenTree/order/templates/order/po_received_items.html index 96dcb4fcf7..f551eda977 100644 --- a/InvenTree/order/templates/order/po_received_items.html +++ b/InvenTree/order/templates/order/po_received_items.html @@ -26,6 +26,7 @@ loadStockTable($("#stock-table"), { purchase_order: {{ order.id }}, part_detail: true, supplier_detail: true, + supplier_part_detail: true, location_detail: true, }, buttons: [ diff --git a/InvenTree/stock/templates/stock/item_childs.html b/InvenTree/stock/templates/stock/item_childs.html index f5d80e5ad1..7c111af06d 100644 --- a/InvenTree/stock/templates/stock/item_childs.html +++ b/InvenTree/stock/templates/stock/item_childs.html @@ -31,6 +31,7 @@ loadStockTable($("#stock-table"), { params: { location_detail: true, part_detail: false, + supplier_part_detail: true, ancestor: {{ item.id }}, }, name: 'item-childs', diff --git a/InvenTree/stock/templates/stock/location.html b/InvenTree/stock/templates/stock/location.html index 499aaa6948..6a69be260e 100644 --- a/InvenTree/stock/templates/stock/location.html +++ b/InvenTree/stock/templates/stock/location.html @@ -265,6 +265,7 @@ {% endif %} part_detail: true, location_detail: true, + supplier_part_detail: true, }, url: "{% url 'api-stock-list' %}", }); diff --git a/InvenTree/templates/InvenTree/index.html b/InvenTree/templates/InvenTree/index.html index a3d793dd26..6a523d152a 100644 --- a/InvenTree/templates/InvenTree/index.html +++ b/InvenTree/templates/InvenTree/index.html @@ -134,6 +134,7 @@ addHeaderAction('stock-to-build', '{% trans "Required for Build Orders" %}', 'fa loadStockTable($('#table-recently-updated-stock'), { params: { part_detail: true, + supplier_part_detail: true, ordering: "-updated", max_results: {% settings_value "STOCK_RECENT_COUNT" %}, }, @@ -151,6 +152,7 @@ loadStockTable($("#table-expired-stock"), { expired: true, location_detail: true, part_detail: true, + supplier_part_detail: true, }, }); @@ -160,6 +162,7 @@ loadStockTable($("#table-stale-stock"), { expired: false, location_detail: true, part_detail: true, + supplier_part_detail: true, }, }); {% endif %}