Exclude same part from "related" input

This commit is contained in:
Oliver 2021-11-26 21:09:29 +11:00
parent 0104266281
commit 2b704ccdc0

View File

@ -763,10 +763,12 @@
part_2: { part_2: {
label: '{% trans "Related Part" %}', label: '{% trans "Related Part" %}',
filters: { filters: {
exclude_id: {{ part.pk }},
exclude_related: {{ part.pk }}, exclude_related: {{ part.pk }},
} }
} }
}, },
focus: 'part_2',
title: '{% trans "Add Related Part" %}', title: '{% trans "Add Related Part" %}',
onSuccess: function() { onSuccess: function() {
$('#related-parts-table').bootstrapTable('refresh'); $('#related-parts-table').bootstrapTable('refresh');