Changeset 12099 for main/waeup.ikoba/trunk/src/waeup
- Timestamp:
- 30 Nov 2014, 21:08:42 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py
r12097 r12099 1117 1117 1118 1118 @property 1119 def selectable_ apptypes(self):1120 apptypes = getUtility(ICustomersUtils).SELECTABLE_APPTYPES_DICT1121 return sorted( apptypes.items())1119 def selectable_contypes(self): 1120 contypes = getUtility(ICustomersUtils).SELECTABLE_CONTYPES_DICT 1121 return sorted(contypes.items()) 1122 1122 1123 1123 @action(_('Create contract'), style='primary') … … 1130 1130 contract = createObject('waeup.%s' % apptype) 1131 1131 self.context.addContract(contract) 1132 apptype = getUtility(ICustomersUtils).SELECTABLE_ APPTYPES_DICT[apptype]1132 apptype = getUtility(ICustomersUtils).SELECTABLE_CONTYPES_DICT[apptype] 1133 1133 self.flash(_('${a} created.', 1134 1134 mapping = {'a': apptype})) -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser_templates/contractaddform.pt
r12097 r12099 10 10 <select id="apptype" name="apptype" size="1" 11 11 class="form-control half"> 12 <option tal:repeat="item view/selectable_ apptypes"12 <option tal:repeat="item view/selectable_contypes" 13 13 tal:attributes="value python:item[0]"> 14 <span tal:replace="python:item[1]"> APPTYPE</span>14 <span tal:replace="python:item[1]">CONTYPE</span> 15 15 </option> 16 16 </select> -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/contracts.py
r12097 r12099 119 119 # Customer must be approved 120 120 cond1 = self.customer.state in getUtility( 121 ICustomersUtils). APPMANAGE_CUSTOMER_STATES121 ICustomersUtils).CONMANAGE_CUSTOMER_STATES 122 122 # Contract must be in state created 123 123 cond2 = self.state in getUtility( 124 ICustomersUtils). APPMANAGE_CONTRACT_STATES124 ICustomersUtils).CONMANAGE_CONTRACT_STATES 125 125 if not (cond1 and cond2): 126 126 return False … … 132 132 def translated_class_name(self): 133 133 try: 134 APPTYPES_DICT = getUtility(ICustomersUtils).APPTYPES_DICT135 return APPTYPES_DICT[self.class_name]134 CONTYPES_DICT = getUtility(ICustomersUtils).CONTYPES_DICT 135 return CONTYPES_DICT[self.class_name] 136 136 except KeyError: 137 137 return -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/utils.py
r12097 r12099 287 287 DOCMANAGE_DOCUMENT_STATES = (CREATED,) 288 288 289 APPMANAGE_CUSTOMER_STATES = DOCMANAGE_CUSTOMER_STATES290 291 APPMANAGE_CONTRACT_STATES = (CREATED,)289 CONMANAGE_CUSTOMER_STATES = DOCMANAGE_CUSTOMER_STATES 290 291 CONMANAGE_CONTRACT_STATES = (CREATED,) 292 292 293 293 SKIP_UPLOAD_VIEWLETS = () … … 314 314 } 315 315 316 APPTYPES_DICT = {316 CONTYPES_DICT = { 317 317 'SampleContract': 'Sample Contract', 318 318 } … … 320 320 SELECTABLE_DOCTYPES_DICT = DOCTYPES_DICT 321 321 322 SELECTABLE_ APPTYPES_DICT = APPTYPES_DICT322 SELECTABLE_CONTYPES_DICT = CONTYPES_DICT 323 323 324 324 def getPDFCreator(self, context=None):
Note: See TracChangeset for help on using the changeset viewer.