Changeset 9405 for main/waeup.kofa/trunk/src/waeup/kofa/payments
- Timestamp:
- 24 Oct 2012, 21:31:48 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/payments
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
r9243 r9405 18 18 from zope.interface import Attribute 19 19 from zope import schema 20 from waeup.kofa.university.vocabularies import ContextualDictSourceFactoryBase 20 21 from waeup.kofa.interfaces import ( 21 22 IKofaObject, SimpleKofaVocabulary, academic_sessions_vocab) … … 28 29 ) 29 30 30 payment_categories = SimpleKofaVocabulary( 31 (_('School Fee'),'schoolfee'), 32 (_('Acceptance Fee'),'clearance'), 33 (_('Bed Allocation Fee'),'bed_allocation'), 34 (_('Hostel Maintenance Fee'),'hostel_maintenance'), 35 (_('Transfer Fee'),'transfer'), 36 (_('Gown Hire Fee'),'gown'), 37 (_('Application Fee'), 'application'), 38 ) 31 class PaymentCategorySource(ContextualDictSourceFactoryBase): 32 """A application category source delivers all special handling categories 33 provided for accommodation booking. 34 """ 35 #: name of dict to deliver from kofa utils. 36 DICT_NAME = 'PAYMENT_CATEGORIES' 39 37 40 38 class IPaymentsContainer(IKofaObject): … … 52 50 title = _(u'Payment Category'), 53 51 default = u'schoolfee', 54 vocabulary = payment_categories,52 source = PaymentCategorySource(), 55 53 required = True, 56 54 ) -
main/waeup.kofa/trunk/src/waeup/kofa/payments/payment.py
r9149 r9405 28 28 from waeup.kofa.payments.interfaces import ( 29 29 IPayment, ISCPayment, IOnlinePayment, 30 payment_states , payment_categories)30 payment_states) 31 31 from waeup.kofa.utils.helpers import attrs_to_fields, get_current_principal 32 32 … … 50 50 @property 51 51 def category(self): 52 return payment_categories.getTermByToken(self.p_category).title 52 utils = getUtility(IKofaUtils) 53 return utils.PAYMENT_CATEGORIES[self.p_category] 53 54 54 55 # not used
Note: See TracChangeset for help on using the changeset viewer.