2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-08 12:50:55 +00:00

Add forms / views for creating / editing / deleting test templates

This commit is contained in:
Oliver Walters
2020-05-17 16:50:34 +10:00
parent cd0e66e3c6
commit e30f6ec374
4 changed files with 107 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ from django.utils.translation import ugettext as _
from .models import Part, PartCategory, PartAttachment
from .models import BomItem
from .models import PartParameterTemplate, PartParameter
from .models import PartTestTemplate
from common.models import Currency
@@ -29,6 +30,19 @@ class PartImageForm(HelperForm):
]
class EditPartTestTemplateForm(HelperForm):
""" Class for creating / editing a PartTestTemplate object """
class Meta:
model = PartTestTemplate
fields = [
'part',
'test_name',
'required'
]
class BomExportForm(forms.Form):
""" Simple form to let user set BOM export options,
before exporting a BOM (bill of materials) file.