2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Display allocations for individual stock items

This commit is contained in:
Oliver
2022-01-27 15:21:04 +11:00
parent 60cde7fe13
commit 5ec1d5aab8
4 changed files with 47 additions and 3 deletions

View File

@ -2308,9 +2308,14 @@ function loadStockAllocationTable(table, options={}) {
title: '{% trans "Allocated Quantity" %}',
formatter: function(value, row) {
var text = value;
var url = `/stock/item/${row.stock_item}/`;
var pk = row.stock_item || row.item;
return renderLink(text, url);
if (pk) {
var url = `/stock/item/${pk}/`;
return renderLink(text, url);
} else {
return value;
}
}
},
]