From 2db6af2af613d4fa3189418084615172323fd4a1 Mon Sep 17 00:00:00 2001 From: eeintech Date: Wed, 7 Apr 2021 10:33:31 -0400 Subject: [PATCH] PO table and stock item template improvements --- .../order/templates/order/purchase_order_detail.html | 3 +++ InvenTree/stock/templates/stock/item_base.html | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index b22d045258..c28f383a9d 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -181,6 +181,9 @@ $("#po-table").inventreeTable({ sortName: 'part__MPN', field: 'supplier_part_detail.MPN', title: '{% trans "MPN" %}', + formatter: function(value, row, index, field) { + return renderLink(value, `/manufacturer-part/${row.supplier_part_detail.manufacturer_part.pk}/`); + }, }, { sortable: true, diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html index f5459dac27..18bf2af400 100644 --- a/InvenTree/stock/templates/stock/item_base.html +++ b/InvenTree/stock/templates/stock/item_base.html @@ -334,6 +334,16 @@ InvenTree | {% trans "Stock Item" %} - {{ item }} {% if item.supplier_part %} + {% trans "Manufacturer" %} + {{ item.supplier_part.manufacturer_part.manufacturer.name }} + + + + {% trans "Manufacturer Part" %} + {{ item.supplier_part.manufacturer_part.MPN }} + + + {% trans "Supplier" %} {{ item.supplier_part.supplier.name }}