From f0595cc05202b8391bc78f056e51c06278907f41 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 18 Apr 2021 21:44:57 +1000 Subject: [PATCH] Fix for display of "outstanding" allocations --- InvenTree/build/models.py | 8 ++++++++ InvenTree/build/templates/build/complete_output.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/InvenTree/build/models.py b/InvenTree/build/models.py index 0fc92ce045..b9167b2eb0 100644 --- a/InvenTree/build/models.py +++ b/InvenTree/build/models.py @@ -897,6 +897,14 @@ class Build(MPTTModel): for bom_item in self.bom_items: part = bom_item.sub_part + # Ignore "trackable" when output is specified + if output and not part.trackable: + continue + + # Ignore "untrackable" parts when output is not specified + if not output and part.trackable: + continue + if not self.isPartFullyAllocated(part, output): unallocated.append(part) diff --git a/InvenTree/build/templates/build/complete_output.html b/InvenTree/build/templates/build/complete_output.html index 54c3fc6763..806677c50c 100644 --- a/InvenTree/build/templates/build/complete_output.html +++ b/InvenTree/build/templates/build/complete_output.html @@ -16,7 +16,7 @@