Changeset 11983 for main/waeup.ikoba/trunk/src/waeup/ikoba/documents
- Timestamp:
- 18 Nov 2014, 09:17:13 (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
r11982 r11983 28 28 from zope.interface import implementedBy 29 29 from zope.i18n import translate 30 from waeup.ikoba.interfaces import IIkobaUtils 30 from waeup.ikoba.interfaces import IIkobaUtils, IObjectHistory 31 31 from waeup.ikoba.interfaces import MessageFactory as _ 32 32 from waeup.ikoba.documents.interfaces import IDocument, IDocument … … 56 56 return 57 57 58 @property 59 def history(self): 60 history = IObjectHistory(self) 61 return history 62 58 63 Document = attrs_to_fields(Document) 59 64 -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/interfaces.py
r11982 r11983 24 24 25 25 class DocumentCategorySource(ContextualDictSourceFactoryBase): 26 """A document category source delivers all categories of documents.26 """A document type source delivers all types of documents. 27 27 28 28 """ 29 29 #: name of dict to deliver from ikoba utils. 30 DICT_NAME = 'DOCUMENT_ CATEGORIES'30 DICT_NAME = 'DOCUMENT_TYPES' 31 31 32 32 class IDocumentsContainer(IIkobaObject): … … 40 40 """ 41 41 id = Attribute('Document Identifier') 42 history = Attribute('Object history, a list of messages') 42 43 43 44 category = schema.Choice( … … 47 48 ) 48 49 50 title = schema.TextLine( 51 title = _(u'Document Title'), 52 required = True, 53 ) 49 54 55 -
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/tests.py
r11982 r11983 25 25 from waeup.ikoba.documents.interfaces import ( 26 26 IDocumentsContainer, IDocument) 27 from waeup.ikoba.interfaces import IObjectHistory 27 28 from waeup.ikoba.documents.container import DocumentsContainer 28 29 from waeup.ikoba.documents.document import Document … … 78 79 self.assertEqual(IWorkflowState(document).getState(), 'created') 79 80 return 81 82 def test_document_history(self): 83 doc = createObject(u'waeup.Document') 84 IWorkflowInfo(doc).fireTransition('create') 85 messages = ' '.join(doc.history.messages) 86 self.assertTrue('Document created by system' in messages) 87 return
Note: See TracChangeset for help on using the changeset viewer.