From 047d2f2f4c6673532fd5fa70b61b8871ac4af8e0 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 28 Jun 2019 09:35:29 +1000 Subject: [PATCH] Include part revision in stock API / table --- InvenTree/static/script/inventree/stock.js | 5 +++++ InvenTree/stock/api.py | 1 + 2 files changed, 6 insertions(+) diff --git a/InvenTree/static/script/inventree/stock.js b/InvenTree/static/script/inventree/stock.js index baa9c2ee87..268b8ed42f 100644 --- a/InvenTree/static/script/inventree/stock.js +++ b/InvenTree/static/script/inventree/stock.js @@ -129,6 +129,11 @@ function loadStockTable(table, options) { } name += row.part__name; + + if (row.part__revision) { + name += " | "; + name += row.part__revision; + } return imageHoverIcon(row.part__image) + renderLink(name, '/part/' + row.part + '/stock/'); } diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py index 8240c6b837..f2a1b81e0a 100644 --- a/InvenTree/stock/api.py +++ b/InvenTree/stock/api.py @@ -291,6 +291,7 @@ class StockList(generics.ListCreateAPIView): 'part', 'part__IPN', 'part__name', + 'part__revision', 'part__description', 'part__image', 'part__category',