From bd1db3944f40a0b367d326f40532b30ab29fae98 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 21 Feb 2025 20:55:22 +1100 Subject: [PATCH] Ignore inactive parts (#9125) (cherry picked from commit 6930ae712231eb26c62320c8981821b4daf4f193) --- src/backend/InvenTree/part/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/InvenTree/part/models.py b/src/backend/InvenTree/part/models.py index dd5e418ef4de..eda1d17fd9a6 100644 --- a/src/backend/InvenTree/part/models.py +++ b/src/backend/InvenTree/part/models.py @@ -2838,6 +2838,9 @@ def update_bom_cost(self, save=True): for sub_part in bom_item.get_valid_parts_for_allocation(): # Check each part which *could* be used + if sub_part != bom_item.sub_part and not sub_part.active: + continue + sub_part_pricing = sub_part.pricing sub_part_min = self.convert(sub_part_pricing.overall_min)