Adds ability to edit target_date in purchaseorder form

This commit is contained in:
Oliver Walters 2021-01-14 17:44:21 +11:00
parent 21e8ddd1e6
commit e8fd597f29

View File

@ -94,6 +94,7 @@ class EditPurchaseOrderForm(HelperForm):
self.field_prefix = {
'reference': 'PO',
'link': 'fa-link',
'target_date': 'fa-calendar-alt',
}
self.field_placeholder = {
@ -102,6 +103,10 @@ class EditPurchaseOrderForm(HelperForm):
super().__init__(*args, **kwargs)
target_date = DatePickerFormField(
help_text=_('Target date for order delivery. Order will be overdue after this date.'),
)
class Meta:
model = PurchaseOrder
fields = [
@ -109,6 +114,7 @@ class EditPurchaseOrderForm(HelperForm):
'supplier',
'supplier_reference',
'description',
'target_date',
'link',
]