mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-19 18:05:54 +00:00
Rename field part.has_variants to part.is_template
This commit is contained in:
@@ -159,7 +159,7 @@ class StockItem(models.Model):
|
||||
})
|
||||
|
||||
# A template part cannot be instantiated as a StockItem
|
||||
if self.part.has_variants:
|
||||
if self.part.is_template:
|
||||
raise ValidationError({
|
||||
'part': _('Stock item cannot be created for a template Part')
|
||||
})
|
||||
@@ -213,7 +213,7 @@ class StockItem(models.Model):
|
||||
part = models.ForeignKey('part.Part', on_delete=models.CASCADE,
|
||||
related_name='stock_items', help_text='Base part',
|
||||
limit_choices_to={
|
||||
'has_variants': False,
|
||||
'is_template': False,
|
||||
'active': True,
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user