Skip to content
Snippets Groups Projects

Resolve "extend worker class"

Merged Piotr Gawron requested to merge 183-extend-worker-class into master
2 files
+ 11
5
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -7,8 +7,9 @@ from django.utils import timezone
from web.algorithm import VerhoeffAlgorithm
from web.forms.forms import DATEPICKER_DATE_ATTRS
from web.models import VoucherType, VoucherTypePrice, Voucher
from web.models import VoucherType, VoucherTypePrice, Voucher, Worker
from web.models.constants import VOUCHER_STATUS_NEW, VOUCHER_STATUS_USED
from web.models.worker_study_role import WORKER_VOUCHER_PARTNER
logger = logging.getLogger(__name__)
@@ -42,6 +43,7 @@ class VoucherForm(ModelForm):
super(VoucherForm, self).__init__(*args, **kwargs)
self.fields['voucher_type'].queryset = voucher_types
self.fields['usage_partner'].queryset = Worker.get_workers_by_worker_type(WORKER_VOUCHER_PARTNER)
self.fields['number'].widget.attrs['readonly'] = True
self.fields['number'].required = False
Loading