From d2b9993e96eb6658be2060490630033bb89a4404 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 24 Sep 2021 12:04:25 +1000 Subject: [PATCH] Fix form filters for "default_supplier" --- InvenTree/templates/js/translated/part.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js index 9abbd2a0b9..e74b6fd743 100644 --- a/InvenTree/templates/js/translated/part.js +++ b/InvenTree/templates/js/translated/part.js @@ -94,7 +94,12 @@ function partFields(options={}) { }, default_location: { }, - default_supplier: {}, + default_supplier: { + filters: { + part_detail: true, + supplier_detail: true, + } + }, default_expiry: { icon: 'fa-calendar-alt', }, @@ -315,6 +320,9 @@ function editPart(pk) { edit: true }); + // Filter supplied parts by the Part ID + fields.default_supplier.filters.part = pk; + var groups = partGroups({}); constructForm(url, {