mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fixed supplier part list bug and hide manufacturer fields in supplier part edit form
This commit is contained in:
parent
c0691c3e9b
commit
ccd35fc4b4
@ -542,6 +542,10 @@ class SupplierPartEdit(AjaxUpdateView):
|
||||
|
||||
supplier_part = self.get_object()
|
||||
|
||||
# Hide Manufacturer fields
|
||||
form.fields['manufacturer'].widget = HiddenInput()
|
||||
form.fields['MPN'].widget = HiddenInput()
|
||||
|
||||
# It appears that hiding a MoneyField fails validation
|
||||
# Therefore the idea to set the value before hiding
|
||||
if form.is_valid():
|
||||
|
@ -306,7 +306,11 @@ function loadSupplierPartTable(table, url, options) {
|
||||
field: 'MPN',
|
||||
title: '{% trans "MPN" %}',
|
||||
formatter: function(value, row, index, field) {
|
||||
if (value && row.manufacturer_part) {
|
||||
return renderLink(value, `/manufacturer-part/${row.manufacturer_part.pk}/`);
|
||||
} else {
|
||||
return "-";
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user