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

Add forms / views / etc to create / edit / delete test results manually

This commit is contained in:
Oliver Walters
2020-05-17 00:26:10 +10:00
parent 82fe497787
commit 327682b719
5 changed files with 130 additions and 4 deletions

View File

@@ -15,7 +15,9 @@ from InvenTree.helpers import GetExportFormats
from InvenTree.forms import HelperForm
from InvenTree.fields import RoundingDecimalFormField
from .models import StockLocation, StockItem, StockItemTracking, StockItemAttachment
from .models import StockLocation, StockItem, StockItemTracking
from .models import StockItemAttachment
from .models import StockItemTestResult
class EditStockItemAttachmentForm(HelperForm):
@@ -32,6 +34,22 @@ class EditStockItemAttachmentForm(HelperForm):
]
class EditStockItemTestResultForm(HelperForm):
"""
Form for creating / editing a StockItemTestResult object.
"""
class Meta:
model = StockItemTestResult
fields = [
'stock_item',
'test',
'result',
'value',
'notes',
]
class EditStockLocationForm(HelperForm):
""" Form for editing a StockLocation """