From 14d18e9d95b8e8189feb2f9822ad58e304eff98f Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 13 Apr 2020 18:53:50 +1000 Subject: [PATCH] "Part" column in Stock table links to supplier part (cherry picked from commit 5f0080cc541c9afe3f009297c1064759b8f37d63) --- InvenTree/InvenTree/static/script/inventree/stock.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/static/script/inventree/stock.js b/InvenTree/InvenTree/static/script/inventree/stock.js index d927d0fbe4..e99e559ed9 100644 --- a/InvenTree/InvenTree/static/script/inventree/stock.js +++ b/InvenTree/InvenTree/static/script/inventree/stock.js @@ -228,8 +228,10 @@ function loadStockTable(table, options) { name += " | "; name += row.part__revision; } + + var url = `/supplier-part/${row.supplier_part}/`; - return imageHoverIcon(row.part__thumbnail) + renderLink(name, '/part/' + row.part + '/stock/'); + return imageHoverIcon(row.part__thumbnail) + renderLink(name, url); } }, {