mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Hide the "part" field when editing manufacturer part and supplier part objects
This commit is contained in:
parent
e03afce335
commit
c32b6b2272
@ -483,7 +483,6 @@ class SupplierPart(models.Model):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Meta:
|
||||
unique_together = ('part', 'supplier', 'SKU')
|
||||
|
||||
|
@ -54,8 +54,12 @@ function editManufacturerPart(part, options={}) {
|
||||
|
||||
var url = `/api/company/part/manufacturer/${part}/`;
|
||||
|
||||
var fields = manufacturerPartFields();
|
||||
|
||||
fields.part.hidden = true;
|
||||
|
||||
constructForm(url, {
|
||||
fields: manufacturerPartFields(),
|
||||
fields: fields,
|
||||
title: '{% trans "Edit Manufacturer Part" %}',
|
||||
onSuccess: options.onSuccess
|
||||
});
|
||||
@ -157,8 +161,13 @@ function createSupplierPart(options={}) {
|
||||
|
||||
function editSupplierPart(part, options={}) {
|
||||
|
||||
var fields = supplierPartFields();
|
||||
|
||||
// Hide the "part" field
|
||||
fields.part.hidden = true;
|
||||
|
||||
constructForm(`/api/company/part/${part}/`, {
|
||||
fields: supplierPartFields(),
|
||||
fields: fields,
|
||||
title: '{% trans "Edit Supplier Part" %}',
|
||||
onSuccess: options.onSuccess
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user