From 2b704ccdc05aaad5b42ccacc4a9857d7e098fb72 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 26 Nov 2021 21:09:29 +1100 Subject: [PATCH] Exclude same part from "related" input --- InvenTree/part/templates/part/detail.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index f8a2c4ba01..a737bfa6fc 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -763,10 +763,12 @@ part_2: { label: '{% trans "Related Part" %}', filters: { + exclude_id: {{ part.pk }}, exclude_related: {{ part.pk }}, } } }, + focus: 'part_2', title: '{% trans "Add Related Part" %}', onSuccess: function() { $('#related-parts-table').bootstrapTable('refresh');