Changeset 12089 for main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Timestamp:
- 28 Nov 2014, 21:35:09 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/utils.py
r12088 r12089 20 20 import grok 21 21 from waeup.ikoba.interfaces import MessageFactory as _ 22 from waeup.ikoba.documents.workflow import CREATED 22 from waeup.ikoba.interfaces import ( 23 CREATED, SUBMITTED, 24 VERIFIED, REJECTED, EXPIRED) 23 25 from waeup.ikoba.documents.interfaces import IDocumentsUtils 24 from waeup.ikoba.documents.workflow import (25 CREATED, SUBMITTED,26 VERIFIED, REJECTED, OUTDATED)27 26 28 27 … … 42 41 VERIFIED: _('verified'), 43 42 REJECTED: _('rejected'), 44 OUTDATED:_('outdated')43 EXPIRED:_('expired') 45 44 } -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/workflow.py
r12053 r12089 25 25 from waeup.ikoba.interfaces import ( 26 26 IObjectHistory, IIkobaWorkflowInfo, 27 SimpleIkobaVocabulary) 27 SimpleIkobaVocabulary, 28 CREATED, SUBMITTED, VERIFIED, REJECTED, EXPIRED) 28 29 from waeup.ikoba.interfaces import MessageFactory as _ 29 30 from waeup.ikoba.workflow import IkobaWorkflow, IkobaWorkflowInfo … … 31 32 from waeup.ikoba.documents.interfaces import IDocument 32 33 33 CREATED = 'created' 34 SUBMITTED = 'submitted' 35 VERIFIED = 'verified' 36 REJECTED = 'rejected' 37 OUTDATED = 'outdated' 34 IMPORTABLE_STATES = (CREATED, SUBMITTED, VERIFIED, REJECTED, EXPIRED) 38 35 39 IMPORTABLE_STATES = (CREATED, SUBMITTED, VERIFIED, REJECTED) 40 41 REGISTRATION_TRANSITIONS = ( 36 VERIFICATION_TRANSITIONS = ( 42 37 Transition( 43 38 transition_id = 'create', … … 71 66 Transition( 72 67 transition_id = 'reset1', 73 title = _('Reset '),68 title = _('Reset to initial state'), 74 69 msg = _('Reset to initial state'), 75 70 source = REJECTED, … … 78 73 Transition( 79 74 transition_id = 'reset2', 80 title = _('Reset '),75 title = _('Reset to initial state'), 81 76 msg = _('Reset to initial state'), 82 77 source = VERIFIED, … … 85 80 Transition( 86 81 transition_id = 'reset3', 87 title = _('Reset '),82 title = _('Reset to initial state'), 88 83 msg = _('Reset to initial state'), 89 84 source = SUBMITTED, … … 91 86 92 87 Transition( 93 transition_id = ' outdate',94 title = _('Set to outdated'),95 msg = _('Set to outdated'),88 transition_id = 'expire', 89 title = _('Set to expired'), 90 msg = _('Set to expired'), 96 91 source = VERIFIED, 97 destination = OUTDATED), 92 destination = EXPIRED), 93 94 Transition( 95 transition_id = 'reset4', 96 title = _('Reset to initial state'), 97 msg = _('Reset to initial state'), 98 source = EXPIRED, 99 destination = CREATED), 98 100 ) 99 101 100 102 101 IMPORTABLE_TRANSITIONS = [i.transition_id for i in REGISTRATION_TRANSITIONS]103 IMPORTABLE_TRANSITIONS = [i.transition_id for i in VERIFICATION_TRANSITIONS] 102 104 103 verification_workflow = IkobaWorkflow( REGISTRATION_TRANSITIONS)105 verification_workflow = IkobaWorkflow(VERIFICATION_TRANSITIONS) 104 106 105 107 class VerificationWorkflowState(WorkflowState, grok.Adapter):
Note: See TracChangeset for help on using the changeset viewer.