diff --git a/InvenTree/stock/forms.py b/InvenTree/stock/forms.py index 98a4de56d6..0d543b1315 100644 --- a/InvenTree/stock/forms.py +++ b/InvenTree/stock/forms.py @@ -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 """ diff --git a/InvenTree/stock/templates/stock/item_tests.html b/InvenTree/stock/templates/stock/item_tests.html index a3e21962e1..6621637f1f 100644 --- a/InvenTree/stock/templates/stock/item_tests.html +++ b/InvenTree/stock/templates/stock/item_tests.html @@ -12,7 +12,9 @@