Changeset 17018 for main/waeup.kofa/trunk
- Timestamp:
- 10 Jul 2022, 11:47:16 (2 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r17017 r17018 1067 1067 manage_applications = True 1068 1068 pnav = 3 1069 display_actions = [[_('Save'), _('Finally Submit')], 1070 [_('Add online payment ticket'), 1071 _('Add balance payment ticket'), 1072 _('Remove selected tickets')]] 1069 1070 @property 1071 def display_actions(self): 1072 actions = [[_('Save'), _('Finally Submit')], 1073 [_('Add online payment ticket'), 1074 _('Add balance payment ticket'), 1075 _('Remove selected tickets')]] 1076 applicants_utils = getUtility(IApplicantsUtils) 1077 if self.context.state not in applicants_utils.BALANCE_PAYMENT_STATES: 1078 actions[1].pop(1) 1079 return actions 1073 1080 1074 1081 @property … … 1288 1295 submit_state = PAID 1289 1296 mandate_days = 31 1290 balance_payments_states = () # not used in base packe1291 1297 1292 1298 @property … … 1327 1333 actions = [[_('Save'), _('Finally Submit')], 1328 1334 [_('Remove selected tickets')]] 1329 if self.context.state in self.balance_payments_states: 1335 applicants_utils = getUtility(IApplicantsUtils) 1336 if self.context.state in applicants_utils.BALANCE_PAYMENT_STATES: 1330 1337 actions[1].append(_('Add balance payment ticket')) 1331 1338 return actions -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r17016 r17018 1086 1086 return 1087 1087 1088 def test_pay_balance(self): 1088 # It was only enabled during implementation of balance payments 1089 def disabled_test_pay_balance(self): 1089 1090 # Managers can make balance payment 1090 1091 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py
r17016 r17018 55 55 #: over to the students section. 56 56 ADDITIONAL_FILES = (('Test File','testfile'),) 57 58 # A list of states which enable balance payments (not used in base package) 59 BALANCE_PAYMENT_STATES = () 57 60 58 61 def setPaymentDetails(self, container, payment, applicant): … … 93 96 as selected by the applicant. 94 97 """ 95 if applicant.state not in (PAID, ADMITTED, SUBMITTED, PROCESSED):98 if applicant.state not in self.BALANCE_PAYMENT_STATES: 96 99 return _('Wrong state.'), None 97 100 p_item = u'Balance'
Note: See TracChangeset for help on using the changeset viewer.