mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-30 16:41:35 +00:00
Add "allow_variants" field to BomItem
This commit is contained in:
InvenTree/part
@@ -2240,6 +2240,7 @@ class BomItem(models.Model):
|
||||
note: Note field for this BOM item
|
||||
checksum: Validation checksum for the particular BOM line item
|
||||
inherited: This BomItem can be inherited by the BOMs of variant parts
|
||||
allow_variants: Stock for part variants can be substituted for this BomItem
|
||||
"""
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
@@ -2288,6 +2289,12 @@ class BomItem(models.Model):
|
||||
help_text=_('This BOM item is inherited by BOMs for variant parts'),
|
||||
)
|
||||
|
||||
allow_variants = models.BooleanField(
|
||||
default=False,
|
||||
verbose_name=_('Allow Variants'),
|
||||
help_text=_('Stock items for variant parts can be used for this BOM item')
|
||||
)
|
||||
|
||||
def get_item_hash(self):
|
||||
""" Calculate the checksum hash of this BOM line item:
|
||||
|
||||
|
Reference in New Issue
Block a user