Changeset 12017 for main


Ignore:
Timestamp:
21 Nov 2014, 05:51:16 (10 years ago)
Author:
Henrik Bettermann
Message:

Add state property.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_export.py

    r12015 r12017  
    138138        self.assertEqual(
    139139            result,
    140             'document_id,history,title,customer_id\r\n'
    141             'd101,[],,\r\n'
     140            'document_id,history,state,title,customer_id\r\n'
     141            'd101,[],,,\r\n'
    142142            )
    143143        return
     
    152152        result = open(self.outfile, 'rb').read()
    153153        self.assertTrue(
    154             'document_id,history,title,customer_id\r\n'
     154            'document_id,history,state,title,customer_id\r\n'
    155155            in result
    156156            )
    157157        self.assertTrue(
    158             'Document created by system\'],My Document,A111111\r\n'
     158            'Document created by system\'],created,My Document,A111111\r\n'
    159159            in result
    160160            )
     
    169169        result = open(self.outfile, 'rb').read()
    170170        self.assertTrue(
    171             'document_id,history,title,customer_id\r\n'
     171            'document_id,history,state,title,customer_id\r\n'
    172172            in result)
    173173        self.assertTrue(
    174             ' Document created by system\'],My Document,A111111\r\n'
     174            ' Document created by system\'],created,My Document,A111111\r\n'
    175175            in result)
    176176        return
     
    184184        result = open(self.outfile, 'rb').read()
    185185        self.assertTrue(
    186             'document_id,history,title,customer_id\r\n'
     186            'document_id,history,state,title,customer_id\r\n'
    187187            in result)
    188188        self.assertTrue(
    189             ' Document created by system\'],My Document,A111111\r\n'
     189            ' Document created by system\'],created,My Document,A111111\r\n'
    190190            in result)
    191191        return
  • main/waeup.ikoba/trunk/src/waeup/ikoba/documents/document.py

    r12005 r12017  
    7272        return history
    7373
     74    @property
     75    def state(self):
     76        state = IWorkflowState(self).getState()
     77        return state
     78
    7479Document = attrs_to_fields(Document)
    7580
  • main/waeup.ikoba/trunk/src/waeup/ikoba/documents/interfaces.py

    r12015 r12017  
    4545    document_id = Attribute('Document Identifier')
    4646    history = Attribute('Object history, a list of messages')
     47    state = Attribute('Returns the verification state of a document')
    4748
    4849    title = schema.TextLine(
Note: See TracChangeset for help on using the changeset viewer.