Merge pull request #284 from SchrodingersGat/hide-fields

Hide some fields from forms
This commit is contained in:
Oliver 2019-05-09 18:43:30 +10:00 committed by GitHub
commit 41d237c0e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,13 +32,10 @@ class CreateStockItemForm(HelperForm):
'part', 'part',
'supplier_part', 'supplier_part',
'location', 'location',
'belongs_to',
'serial',
'batch', 'batch',
'quantity', 'quantity',
'status', 'status',
'notes', 'notes',
# 'customer',
'URL', 'URL',
] ]
@ -67,7 +64,13 @@ class StocktakeForm(forms.ModelForm):
class EditStockItemForm(HelperForm): 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: class Meta:
model = StockItem model = StockItem