Changeset 5223 for WAeUP_SRP


Ignore:
Timestamp:
14 Jun 2010, 17:45:58 (14 years ago)
Author:
Henrik Bettermann
Message:

resolve #690

Location:
WAeUP_SRP/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r5210 r5223  
    19321932
    19331933
    1934     security.declareProtected(ModifyPortalContent,"changeWorkflowState")
     1934    security.declarePublic("changeWorkflowState")
    19351935    def changeWorkflowState(self, content, state_id, acquire_permissions=False,
    19361936                            portal_workflow=None, **kw):
    1937         """Change the workflow state of an object
    1938         @param content: Content obj which state will be changed
    1939         @param state_id: name of the state to put on content
    1940         @param acquire_permissions: True->All permissions unchecked and on riles and
    1941                                     acquired
    1942                                     False->Applies new state security map
    1943         @param portal_workflow: Provide workflow tool (optimisation) if known
    1944         @param kw: change the values of same name of the state mapping
    1945         @return: None
    1946         """
     1937        #Change the workflow state of an object
     1938        #@param content: Content obj which state will be changed
     1939        #@param state_id: name of the state to put on content
     1940        #@param acquire_permissions: True->All permissions unchecked and on riles and
     1941        #                            acquired
     1942        #                            False->Applies new state security map
     1943        #@param portal_workflow: Provide workflow tool (optimisation) if known
     1944        #@param kw: change the values of same name of the state mapping
     1945        #@return: None
     1946       
    19471947   
    19481948        if portal_workflow is None:
  • WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py

    r5205 r5223  
    8585    d['Title'] = 'Payments'
    8686    payments.getContent().edit(mapping=d)
    87     wftool.doActionFor(payments,'open')
     87    context.waeup_tool.changeWorkflowState(payments, 'opened')
    8888else:
    8989    payments = getattr(student,'payments')
     
    118118    payment = getattr(payments,p_id)
    119119    wftool = context.portal_workflow
    120     wftool.doActionFor(payment,'open')
     120    context.waeup_tool.changeWorkflowState(payment, 'opened')
    121121    payment.getContent().edit(mapping=info)
    122     wftool.doActionFor(payment,'close')
     122    context.waeup_tool.changeWorkflowState(payment, 'closed')
    123123
    124124    study_course = getattr(student,'study_course')
    125125    try:
    126         wftool.doActionFor(study_course,'open')
     126        context.waeup_tool.changeWorkflowState(study_course, 'opened')
    127127    except:
    128128        pass
Note: See TracChangeset for help on using the changeset viewer.