Ignore:
Timestamp:
25 Nov 2014, 08:19:54 (10 years ago)
Author:
Henrik Bettermann
Message:

Add second customer document class.
Select document factory when adding documents.
Add last_transition_date attribute and further property attributes to documents.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/documents/document.py

    r12032 r12053  
    7676        try:
    7777            TRANSLATED_STATES = getUtility(IDocumentsUtils).TRANSLATED_STATES
    78             ts = TRANSLATED_STATES[self.state]
    79             return ts
     78            return TRANSLATED_STATES[self.state]
    8079        except KeyError:
    8180            return
     81
     82    @property
     83    def classname(self):
     84        return self.__class__.__name__
     85
     86    @property
     87    def formatted_transition_date(self):
     88        try:
     89            return self.last_transition_date.strftime('%Y-%m-%d %H:%M:%S')
     90        except AttributeError:
     91            return
     92       
    8293
    8394Document = attrs_to_fields(Document)
Note: See TracChangeset for help on using the changeset viewer.