Commit 0675b0e8 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Revert the previous change. This is not necessary if we use __getitem__, i.e....

Revert the previous change. This is not necessary if we use __getitem__, i.e. sci["object"] instead of sci.object.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6460 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 78480427
......@@ -27,14 +27,6 @@ from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5Type.Utils import convertToMixedCase
from string import join
from zLOG import LOG
from Acquisition import Explicit
class ERP5StateChangeInfo(Explicit, StateChangeInfo):
"""Override StateChangeInfo to make an acquisition wrapper, so that
zope can obtain the context. This is important to make proxy roles effective
in workflow scripts.
"""
pass
def DCWorkflowDefinition_listGlobalActions(self, info):
'''
......@@ -156,9 +148,8 @@ def DCWorkflowDefinition_executeTransition(self, ob, tdef=None, kwargs=None):
if tdef is not None and tdef.script_name:
script = self.scripts[tdef.script_name]
# Pass lots of info to the script in a single parameter.
sci = ERP5StateChangeInfo(
sci = StateChangeInfo(
ob, self, former_status, tdef, old_sdef, new_sdef, kwargs)
sci = sci.__of__(self)
try:
#LOG('_executeTransition', 0, "script = %s, sci = %s" % (repr(script), repr(sci)))
script(sci) # May throw an exception.
......@@ -238,9 +229,8 @@ def DCWorkflowDefinition_executeTransition(self, ob, tdef=None, kwargs=None):
else:
script = self.scripts[tdef.after_script_name]
# Pass lots of info to the script in a single parameter.
sci = ERP5StateChangeInfo(
sci = StateChangeInfo(
ob, self, status, tdef, old_sdef, new_sdef, kwargs)
sci = sci.__of__(self)
script(sci) # May throw an exception.
# Return the new state object.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment