Changeset 12210 for main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Timestamp:
- 13 Dec 2014, 08:58:43 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/document.py
r12204 r12210 86 86 def formatted_transition_date(self): 87 87 try: 88 return self. last_transition_date.strftime('%Y-%m-%d %H:%M:%S')89 except AttributeError:88 return self.history.messages[-1].split(' - ')[0] 89 except IndexError: 90 90 return 91 91 -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/interfaces.py
r12200 r12210 54 54 ) 55 55 56 last_transition_date = schema.Datetime(57 title = _(u'Last Transition Date'),58 required = False,59 readonly = False,60 )61 62 56 def setMD5(): 63 57 """Determine md5 checksum of selected files and store checksums as -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/workflow.py
r12200 r12210 134 134 @grok.subscribe(IDocument, IWorkflowTransitionEvent) 135 135 def handle_document_transition_event(obj, event): 136 """Append message to document history and log file and update 137 last_transition_date when transition happened. 136 """Append message to document history and log file. 138 137 139 138 Undo the verification of document and raise an exception if document … … 151 150 history = IObjectHistory(obj) 152 151 history.addMessage(msg) 153 obj.last_transition_date = datetime.utcnow()154 152 try: 155 153 customers_container = grok.getSite()['customers']
Note: See TracChangeset for help on using the changeset viewer.