Merge pull request #1750 from matmair/stock-table-supplier-part

Stock table add supplier part column
This commit is contained in:
Oliver 2021-07-03 11:59:46 +10:00 committed by GitHub
commit 1d5429f07e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -41,6 +41,7 @@
part: {{ part.id }},
location_detail: true,
part_detail: false,
supplier_part_detail: true,
},
groupByField: 'location',
buttons: [

View File

@ -685,6 +685,20 @@ function loadStockTable(table, options) {
return renderLink(text, link);
}
},
{
field: 'supplier_part',
title: '{% trans "Supplier Part" %}',
formatter: function(value, row) {
if (!value) {
return '-';
}
var link = `/supplier-part/${row.supplier_part}/stock/`;
var text = `${row.supplier_part_detail.SKU}`;
return renderLink(text, link);
}
},
{
field: 'purchase_price',
title: '{% trans "Purchase Price" %}',