mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #2075 from SchrodingersGat/default-supplier-fix
Default supplier fix
(cherry picked from commit b3c8bd7779
)
This commit is contained in:
parent
d7ac9978eb
commit
a1d54690c2
@ -94,7 +94,12 @@ function partFields(options={}) {
|
|||||||
},
|
},
|
||||||
default_location: {
|
default_location: {
|
||||||
},
|
},
|
||||||
default_supplier: {},
|
default_supplier: {
|
||||||
|
filters: {
|
||||||
|
part_detail: true,
|
||||||
|
supplier_detail: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
default_expiry: {
|
default_expiry: {
|
||||||
icon: 'fa-calendar-alt',
|
icon: 'fa-calendar-alt',
|
||||||
},
|
},
|
||||||
@ -315,6 +320,9 @@ function editPart(pk) {
|
|||||||
edit: true
|
edit: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Filter supplied parts by the Part ID
|
||||||
|
fields.default_supplier.filters.part = pk;
|
||||||
|
|
||||||
var groups = partGroups({});
|
var groups = partGroups({});
|
||||||
|
|
||||||
constructForm(url, {
|
constructForm(url, {
|
||||||
@ -338,6 +346,9 @@ function duplicatePart(pk, options={}) {
|
|||||||
duplicate: pk,
|
duplicate: pk,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Remove "default_supplier" field
|
||||||
|
delete fields['default_supplier'];
|
||||||
|
|
||||||
// If we are making a "variant" part
|
// If we are making a "variant" part
|
||||||
if (options.variant) {
|
if (options.variant) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user