Commit 07da2461 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use recurseCallMethod instead of ERP5Site_checkDataWithScript that is deprecated and inefficient.

parent a12fa2c2
...@@ -62,5 +62,5 @@ def migrateEventWorkflowHistory(self): ...@@ -62,5 +62,5 @@ def migrateEventWorkflowHistory(self):
return return
workflow_tool = portal.portal_workflow workflow_tool = portal.portal_workflow
workflow_tool._jumpToStateFor(self, new_state) workflow_tool._jumpToStateFor(self, new_state)
return ['Event workflow migration on %s : %s -> %s' % ( return 'Event workflow migration on %s : %s -> %s' % (
self.getPath(), current_state, new_state)] self.getPath(), current_state, new_state)
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>active_sense_method_id</string> </key> <key> <string>active_sense_method_id</string> </key>
<value> <string>ERP5Site_migrateEventWorkflowHistory</string> </value> <value> <string>EventModule_migrateEventWorkflowHistory</string> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
......
...@@ -50,12 +50,13 @@ ...@@ -50,12 +50,13 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>active_process = context.getPortalObject().portal_activities.newActiveProcess()\n <value> <string>portal = context.getPortalObject()\n
context.getPortalObject().ERP5Site_checkDataWithScript("Event_migrateEventWorkflowHistory",\n active_process = portal.portal_activities.newActiveProcess()\n
tag="migrate",\n portal.event_module.recurseCallMethod(\n
relative_url="event_module",\n \'Event_migrateEventWorkflowHistory\',\n
full=1,\n active_process=active_process,\n
active_process=active_process.getPath())\n min_depth=1,\n
max_depth=1)\n
print "Migration started with process id: %s" %active_process.getPath()\n print "Migration started with process id: %s" %active_process.getPath()\n
return printed\n return printed\n
</string> </value> </string> </value>
...@@ -66,7 +67,7 @@ return printed\n ...@@ -66,7 +67,7 @@ return printed\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>ERP5Site_migrateEventWorkflowHistory</string> </value> <value> <string>EventModule_migrateEventWorkflowHistory</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
581 582
\ No newline at end of file \ No newline at end of file
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