From ef9fb5b0183b3da3a61149aba91c248d556f8a25 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 9 May 2019 18:38:37 +1000 Subject: [PATCH] Hide some fields from forms --- InvenTree/stock/forms.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/InvenTree/stock/forms.py b/InvenTree/stock/forms.py index a94156ad29..c040c58fce 100644 --- a/InvenTree/stock/forms.py +++ b/InvenTree/stock/forms.py @@ -32,13 +32,10 @@ class CreateStockItemForm(HelperForm): 'part', 'supplier_part', 'location', - 'belongs_to', - 'serial', 'batch', 'quantity', 'status', 'notes', - # 'customer', 'URL', ] @@ -67,7 +64,13 @@ class StocktakeForm(forms.ModelForm): class EditStockItemForm(HelperForm): - """ Form for editing a StockItem object """ + """ Form for editing a StockItem object. + Note that not all fields can be edited here (even if they can be specified during creation. + + location - Must be updated in a 'move' transaction + quantity - Must be updated in a 'stocktake' transaction + part - Cannot be edited after creation + """ class Meta: model = StockItem