Changeset 12032 for main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Timestamp:
- 21 Nov 2014, 18:52:43 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/customer.py
r12005 r12032 36 36 from waeup.ikoba.interfaces import ( 37 37 IObjectHistory, IUserAccount, IFileStoreNameChooser, IFileStoreHandler, 38 IIkobaUtils, registration_states_vocab,IExtFileStore,38 IIkobaUtils, IExtFileStore, 39 39 CREATED, REQUESTED, APPROVED) 40 40 from waeup.ikoba.customers.export import EXPORTER_NAMES 41 41 from waeup.ikoba.customers.interfaces import ( 42 ICustomer, ICustomerNavigation, ICSVCustomerExporter) 42 ICustomer, ICustomerNavigation, ICSVCustomerExporter, 43 ICustomersUtils) 43 44 from waeup.ikoba.customers.utils import generate_customer_id 44 45 from waeup.ikoba.customers.documents import CustomerDocumentsContainer … … 126 127 @property 127 128 def translated_state(self): 128 state = registration_states_vocab.getTermByToken( 129 self.state).title 130 return state 129 try: 130 TRANSLATED_STATES = getUtility(ICustomersUtils).TRANSLATED_STATES 131 ts = TRANSLATED_STATES[self.state] 132 return ts 133 except KeyError: 134 return 131 135 132 136 @property -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/export.py
r12018 r12032 23 23 from zope.component import getUtility 24 24 from waeup.ikoba.interfaces import ( 25 IExtFileStore, IFileStoreNameChooser , IIkobaUtils)25 IExtFileStore, IFileStoreNameChooser) 26 26 from waeup.ikoba.interfaces import MessageFactory as _ 27 27 from waeup.ikoba.customers.catalog import CustomersQuery … … 147 147 ICustomerDocument, 148 148 exclude_attribs=False, 149 omit=['is_editable' ]))) + (149 omit=['is_editable', 'translated_state']))) + ( 150 150 'customer_id',) 151 151 -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/utils.py
r12018 r12032 19 19 """ 20 20 import grok 21 from waeup.ikoba.interfaces import STARTED, APPROVED 21 from waeup.ikoba.interfaces import MessageFactory as _ 22 from waeup.ikoba.interfaces import CREATED, STARTED, REQUESTED, APPROVED 22 23 from waeup.ikoba.customers.interfaces import ICustomersUtils 23 24 … … 41 42 42 43 DOCMANAGE_STATES = (APPROVED,) 44 45 TRANSLATED_STATES = { 46 CREATED: _('created'), 47 STARTED: _('started'), 48 REQUESTED: _('requested'), 49 APPROVED: _('approved'), 50 }
Note: See TracChangeset for help on using the changeset viewer.