2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 04:00:57 +00:00

Limit choices for Part selection

Based on is_template / virtual / active status
This commit is contained in:
Oliver Walters
2020-03-18 21:28:11 +11:00
parent b2cb41f879
commit 8eaaf62eda
6 changed files with 67 additions and 1 deletions

View File

@ -1067,6 +1067,7 @@ class BomItem(models.Model):
help_text=_('Select parent part'),
limit_choices_to={
'assembly': True,
'is_template': False,
})
# A link to the child item (sub-part)
@ -1075,6 +1076,7 @@ class BomItem(models.Model):
help_text=_('Select part to be used in BOM'),
limit_choices_to={
'component': True,
'is_template': False,
})
# Quantity required