PO table and stock item template improvements

This commit is contained in:
eeintech 2021-04-07 10:33:31 -04:00
parent b2264940a3
commit 2db6af2af6
2 changed files with 13 additions and 0 deletions

View File

@ -181,6 +181,9 @@ $("#po-table").inventreeTable({
sortName: 'part__MPN', sortName: 'part__MPN',
field: 'supplier_part_detail.MPN', field: 'supplier_part_detail.MPN',
title: '{% trans "MPN" %}', title: '{% trans "MPN" %}',
formatter: function(value, row, index, field) {
return renderLink(value, `/manufacturer-part/${row.supplier_part_detail.manufacturer_part.pk}/`);
},
}, },
{ {
sortable: true, sortable: true,

View File

@ -334,6 +334,16 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
{% if item.supplier_part %} {% if item.supplier_part %}
<tr> <tr>
<td><span class='fas fa-industry'></span></td> <td><span class='fas fa-industry'></span></td>
<td>{% trans "Manufacturer" %}</td>
<td><a href="{% url 'company-detail' item.supplier_part.manufacturer_part.manufacturer.id %}">{{ item.supplier_part.manufacturer_part.manufacturer.name }}</a></td>
</tr>
<tr>
<td><span class='fas fa-hashtag'></span></td>
<td>{% trans "Manufacturer Part" %}</td>
<td><a href="{% url 'manufacturer-part-detail' item.supplier_part.manufacturer_part.id %}">{{ item.supplier_part.manufacturer_part.MPN }}</a></td>
</tr>
<tr>
<td><span class='fas fa-building'></span></td>
<td>{% trans "Supplier" %}</td> <td>{% trans "Supplier" %}</td>
<td><a href="{% url 'company-detail' item.supplier_part.supplier.id %}">{{ item.supplier_part.supplier.name }}</a></td> <td><a href="{% url 'company-detail' item.supplier_part.supplier.id %}">{{ item.supplier_part.supplier.name }}</a></td>
</tr> </tr>