2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +00:00

Create view / form / URL for PartParameter creation

This commit is contained in:
Oliver Walters
2019-08-20 14:14:21 +10:00
parent db834802e3
commit c68c79ea43
5 changed files with 68 additions and 13 deletions

View File

@ -1066,6 +1066,11 @@ class PartParameterTemplate(models.Model):
except PartParameterTemplate.DoesNotExist:
pass
@property
def instance_count(self):
""" Return the number of instances of this Parameter Template """
return self.instances.count()
name = models.CharField(max_length=100, help_text='Parameter Name')
units = models.CharField(max_length=25, help_text='Parameter Units', blank=True)