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

Pre-fill stockitem expiry date in CreateStockItem form

This commit is contained in:
Oliver Walters
2021-01-04 23:40:51 +11:00
parent 37dcf1c1cf
commit 7d7d5d24cc
2 changed files with 11 additions and 1 deletions

View File

@@ -109,6 +109,10 @@ class ConvertStockItemForm(HelperForm):
class CreateStockItemForm(HelperForm):
""" Form for creating a new StockItem """
expiry_date = DatePickerFormField(
help_text=('Expiration date for this stock item'),
)
serial_numbers = forms.CharField(label=_('Serial numbers'), required=False, help_text=_('Enter unique serial numbers (or leave blank)'))
def __init__(self, *args, **kwargs):
@@ -130,6 +134,7 @@ class CreateStockItemForm(HelperForm):
'batch',
'serial_numbers',
'purchase_price',
'expiry_date',
'link',
'delete_on_deplete',
'status',