Changeset 6406 for main/waeup.sirp/branches/accesscodes-with-workflow
- Timestamp:
- 19 Jun 2011, 13:30:15 (14 years ago)
- Location:
- main/waeup.sirp/branches/accesscodes-with-workflow/src/waeup/sirp/accesscodes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/accesscodes-with-workflow/src/waeup/sirp/accesscodes/accesscodes.py
r6403 r6406 6 6 from BTrees.OIBTree import OIBTree 7 7 from datetime import datetime 8 from hurry.workflow.interfaces import IWorkflowInfo, InvalidTransitionError 8 from hurry.workflow.interfaces import ( 9 IWorkflowInfo, InvalidTransitionError, IWorkflowState 10 ) 9 11 from random import SystemRandom as random 10 from waeup.sirp.interfaces import IWAeUPSIRPPluggable 12 from waeup.sirp.interfaces import IWAeUPSIRPPluggable, IObjectHistory 11 13 from waeup.sirp.accesscodes.interfaces import ( 12 14 IAccessCode, IAccessCodeBatch, IAccessCodeBatchContainer … … 51 53 return None 52 54 return self.batch.cost 55 56 @property 57 def state(self): 58 state = IWorkflowState(self).getState() 59 return state 60 61 @property 62 def history(self): 63 history = IObjectHistory(self) 64 return history 53 65 54 66 class AccessCodeBatch(grok.Model): -
main/waeup.sirp/branches/accesscodes-with-workflow/src/waeup/sirp/accesscodes/interfaces.py
r6403 r6406 2 2 """ 3 3 from zope import schema 4 from zope.interface import Interface 4 from zope.interface import Interface, Attribute 5 5 from waeup.sirp.interfaces import IWAeUPObject 6 6 … … 8 8 """An access code. 9 9 """ 10 history = Attribute('Object history, a list of messages.') 11 state = Attribute('Returns the workflow state of an accesscode') 12 10 13 batch_serial = schema.Int( 11 14 title = u'Serial number inside batch',
Note: See TracChangeset for help on using the changeset viewer.