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:
@ -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
|
||||
|
Reference in New Issue
Block a user