diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index b0a96c8759..dc1a0e9568 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -685,7 +685,7 @@ class Part(models.Model): - Exclude parts which this part is in the BOM for """ - parts = Part.objects.filter(component=True) + parts = Part.objects.filter(component=True).exclude(id=self.id) parts = parts.exclude(id__in=[part.id for part in self.used_in.all()]) return parts diff --git a/InvenTree/part/templates/part/bom_upload/select_parts.html b/InvenTree/part/templates/part/bom_upload/select_parts.html index 803f9dc496..8a1a7b17a6 100644 --- a/InvenTree/part/templates/part/bom_upload/select_parts.html +++ b/InvenTree/part/templates/part/bom_upload/select_parts.html @@ -47,6 +47,10 @@ {% for item in row.data %} {% if item.column.guess == 'Part' %} + +