Changeset 12681 for main/waeup.ikoba/branches/uli-payments
- Timestamp:
- 7 Mar 2015, 03:16:22 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/customers/contracts.py
r12663 r12681 19 19 Customer contract components. 20 20 """ 21 import os22 21 import grok 23 from zope.component import queryUtility,getUtility22 from zope.component import getUtility 24 23 from zope.component.interfaces import IFactory 25 24 from zope.interface import implementedBy … … 28 27 from waeup.ikoba.interfaces import MessageFactory as _ 29 28 from waeup.ikoba.interfaces import ( 30 IIkobaUtils, IObjectHistory, 31 VERIFIED, APPROVED, PROVISIONALLY, 32 IIDSource) 29 IObjectHistory, VERIFIED, APPROVED, PROVISIONALLY, IIDSource) 33 30 from waeup.ikoba.customers.interfaces import ( 34 IContractsContainer, ICustomerNavigation, 35 IContract, IContractSelectProduct, ICustomersUtils, 36 ISampleContract, ISampleContractProcess, ISampleContractEdit, 37 ISampleContractOfficialUse) 38 from waeup.ikoba.customers.utils import generate_contract_id 31 IContractsContainer, ICustomerNavigation, IContract, 32 IContractSelectProduct, ICustomersUtils, ISampleContract, 33 ISampleContractProcess, ISampleContractEdit, ISampleContractOfficialUse) 39 34 from waeup.ikoba.utils.helpers import attrs_to_fields 35 40 36 41 37 class ContractsContainer(grok.Container): … … 61 57 ContractsContainer = attrs_to_fields(ContractsContainer) 62 58 59 63 60 class ContractBase(grok.Container): 64 61 """This is a customer contract baseclass. 65 62 """ 66 grok.implements(IContractSelectProduct) # Nec esary for the selectproduct page67 63 grok.implements(IContractSelectProduct) # Neccessary for the 64 # selectproduct page (why?) 68 65 grok.baseclass() 69 66 … … 150 147 state = getattr(obj, 'state', None) 151 148 if state and state != VERIFIED: 152 return False, _("Attached documents must be verified first.") 149 return False, _( 150 "Attached documents must be verified first.") 153 151 return True, None 154 152 … … 177 175 178 176 grok.implements( 179 ISampleContractProcess, # must come before ISampleContract177 ISampleContractProcess, # must come before ISampleContract 180 178 ISampleContract, 181 179 ISampleContractEdit, … … 210 208 return implementedBy(SampleContract) 211 209 210 212 211 @grok.subscribe(IContract, grok.IObjectAddedEvent) 213 212 def handle_contract_added(contract, event):
Note: See TracChangeset for help on using the changeset viewer.