Fix for display of "outstanding" allocations

This commit is contained in:
Oliver Walters 2021-04-18 21:44:57 +10:00
parent 9e470d4064
commit f0595cc052
2 changed files with 9 additions and 1 deletions

View File

@ -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)

View File

@ -16,7 +16,7 @@
<div class='panel panel-default'>
<div class='panel panel-heading'>
<a data-toggle='collapse' href='#collapse-unallocated'>
{{ unallocated_parts|length }} {% trans "parts have not been fully allocated" %}
{{ unallocated_parts|length }} {% trans "tracked parts have not been fully allocated" %}
</a>
</div>
<div class='panel-collapse collapse' id='collapse-unallocated'>