Changeset 12144 for main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Timestamp:
- 4 Dec 2014, 18:10:11 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/contracts.py
r12103 r12144 24 24 from zope.component.interfaces import IFactory 25 25 from zope.interface import implementedBy 26 from zope.schema import getFields 26 27 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState 27 28 from waeup.ikoba.interfaces import MessageFactory as _ 28 from waeup.ikoba.interfaces import IIkobaUtils, IObjectHistory 29 from waeup.ikoba.interfaces import IIkobaUtils, IObjectHistory, VERIFIED 29 30 from waeup.ikoba.customers.interfaces import ( 30 31 IContractsContainer, ICustomerNavigation, … … 62 63 grok.provides(IContract) 63 64 grok.baseclass() 65 66 check_docs_interface = None 64 67 65 68 contract_category = None … … 134 137 135 138 @property 139 def is_approvable(self): 140 for key, field in getFields(self.check_docs_interface).items(): 141 if key.endswith('_object'): 142 obj = getattr(self, key, None) 143 state = getattr(obj, 'state', None) 144 if state and state != VERIFIED: 145 return False 146 return True 147 148 @property 136 149 def translated_class_name(self): 137 150 try: … … 153 166 154 167 edit_form_fields_interface = ISampleContractEdit 168 169 check_docs_interface = ISampleContract 155 170 156 171 SampleContract = attrs_to_fields(SampleContract) -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/interfaces.py
r12143 r12144 276 276 last_product_id = Attribute( 277 277 'Id of product recently stored with the contract') 278 is_editable = Attribute('Document editable by customer') 278 is_editable = Attribute('Contract editable by customer') 279 is_approvable = Attribute('Contract approvable by officer') 279 280 translated_class_name = Attribute('Translatable class name') 280 281
Note: See TracChangeset for help on using the changeset viewer.