2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 22:06:28 +00:00

Add build output selection to builditem creation form

This commit is contained in:
Oliver Walters
2020-10-22 23:28:15 +11:00
parent 1ca08f8bff
commit fae516b38e
7 changed files with 284 additions and 10 deletions

View File

@ -934,8 +934,10 @@ class Part(MPTTModel):
def required_parts(self):
""" Return a list of parts required to make this part (list of BOM items) """
parts = []
for bom in self.bom_items.all().select_related('sub_part'):
parts.append(bom.sub_part)
return parts
def get_allowed_bom_items(self):