Changeset 5223 for WAeUP_SRP/trunk
- Timestamp:
- 14 Jun 2010, 17:45:58 (15 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTool.py
r5210 r5223 1932 1932 1933 1933 1934 security.declareP rotected(ModifyPortalContent,"changeWorkflowState")1934 security.declarePublic("changeWorkflowState") 1935 1935 def changeWorkflowState(self, content, state_id, acquire_permissions=False, 1936 1936 portal_workflow=None, **kw): 1937 """Change the workflow state of an object1938 @param content: Content obj which state will be changed1939 @param state_id: name of the state to put on content1940 @param acquire_permissions: True->All permissions unchecked and on riles and1941 acquired1942 False->Applies new state security map1943 @param portal_workflow: Provide workflow tool (optimisation) if known1944 @param kw: change the values of same name of the state mapping1945 @return: None1946 """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 1947 1947 1948 1948 if portal_workflow is None: -
WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py
r5205 r5223 85 85 d['Title'] = 'Payments' 86 86 payments.getContent().edit(mapping=d) 87 wftool.doActionFor(payments,'open')87 context.waeup_tool.changeWorkflowState(payments, 'opened') 88 88 else: 89 89 payments = getattr(student,'payments') … … 118 118 payment = getattr(payments,p_id) 119 119 wftool = context.portal_workflow 120 wftool.doActionFor(payment,'open')120 context.waeup_tool.changeWorkflowState(payment, 'opened') 121 121 payment.getContent().edit(mapping=info) 122 wftool.doActionFor(payment,'close')122 context.waeup_tool.changeWorkflowState(payment, 'closed') 123 123 124 124 study_course = getattr(student,'study_course') 125 125 try: 126 wftool.doActionFor(study_course,'open')126 context.waeup_tool.changeWorkflowState(study_course, 'opened') 127 127 except: 128 128 pass
Note: See TracChangeset for help on using the changeset viewer.