diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index 492da8f5de..96ffa581f4 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -2233,7 +2233,7 @@ class Part(MPTTModel): for child in children: parts.append(child) - # Immediate parent + # Immediate parent, and siblings if self.variant_of: parts.append(self.variant_of) diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index 53e1321e1a..a46d43b007 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -556,7 +556,14 @@ class StockItem(MPTTModel): # If the item points to a build, check that the Part references match if self.build: - if not self.part == self.build.part: + + if self.part == self.build.part: + # Part references match exactly + pass + elif self.part in self.build.part.get_conversion_options(): + # Part reference is one of the valid conversion options for the build output + pass + else: raise ValidationError({ 'build': _("Build reference does not point to the same part object") })