Ignore:
Timestamp:
19 Jun 2011, 13:30:15 (13 years ago)
Author:
Henrik Bettermann
Message:

Add access code attributes 'state' and 'history'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/branches/accesscodes-with-workflow/src/waeup/sirp/accesscodes/accesscodes.py

    r6403 r6406  
    66from BTrees.OIBTree import OIBTree
    77from datetime import datetime
    8 from hurry.workflow.interfaces import IWorkflowInfo, InvalidTransitionError
     8from hurry.workflow.interfaces import (
     9    IWorkflowInfo, InvalidTransitionError, IWorkflowState
     10    )
    911from random import SystemRandom as random
    10 from waeup.sirp.interfaces import IWAeUPSIRPPluggable
     12from waeup.sirp.interfaces import IWAeUPSIRPPluggable, IObjectHistory
    1113from waeup.sirp.accesscodes.interfaces import (
    1214    IAccessCode, IAccessCodeBatch, IAccessCodeBatchContainer
     
    5153            return None
    5254        return self.batch.cost
     55
     56    @property
     57    def state(self):
     58        state = IWorkflowState(self).getState()
     59        return state
     60
     61    @property
     62    def history(self):
     63        history = IObjectHistory(self)
     64        return history
    5365
    5466class AccessCodeBatch(grok.Model):
Note: See TracChangeset for help on using the changeset viewer.