Ignore:
Timestamp:
10 Jun 2011, 15:41:32 (13 years ago)
Author:
uli
Message:

Maintain history of objects in a separate component, similar to workflows, instead of storing everything with the object core object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/workflow.py

    r6335 r6339  
    1010    InvalidTransitionError, IWorkflowTransitionEvent)
    1111from waeup.sirp.applicants.interfaces import IApplicantBaseData
     12from waeup.sirp.interfaces import IObjectHistory
    1213
    1314
     
    172173    """
    173174    timestamp = datetime.now().strftime("%d/%m/%Y %H:%M:%S")
    174     # XXX: We should not store HTML code but simple messages.
    175175    msg = '%s - %s (new state: %s)' % (
    176176        timestamp, event.transition.user_data['msg'], event.destination)
    177     msgs = getattr(obj, 'msgs', None)
    178     if msgs:
    179         msgs += '<br />'
    180         msgs += msg
    181     else:
    182         msgs = msg
    183     obj.msgs = msgs
     177    history = IObjectHistory(obj)
     178    history.addMessage(msg)
    184179    return
Note: See TracChangeset for help on using the changeset viewer.