Commit 91c00d9d authored by Rafael Monnerat's avatar Rafael Monnerat

Use getDefaultModule instead hardcode values

parent bb655f5d
...@@ -50,13 +50,10 @@ ...@@ -50,13 +50,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># XXX (rafael) I beleave KM has a much better way to do this, \n <value> <string>"""\n
# clone web page.\n XXX (rafael) I believe KM has a much better way to do this, \n
\n clone web page, maybe using Base_createCloneDocument from erp5_base\n
conv_module_id = \'test_page_module\'\n """\n
\n
if conv_obj_type == \'Web Page\':\n
conv_module_id = \'web_page_module\'\n
\n \n
conv_obj_module = context.getDefaultModule(conv_obj_type)\n conv_obj_module = context.getDefaultModule(conv_obj_type)\n
counter = 0\n counter = 0\n
...@@ -81,7 +78,8 @@ for uid in uids:\n ...@@ -81,7 +78,8 @@ for uid in uids:\n
obj.manage_copyObjects(\n obj.manage_copyObjects(\n
map(lambda x: x.getId(), obj.objectValues())))\n map(lambda x: x.getId(), obj.objectValues())))\n
\n \n
return conv_obj_module.Base_redirect(\'\', dict(portal_status_message=context.Base_translateString(str(counter) + " object(s) converted.")))\n return conv_obj_module.Base_redirect(\'\', \n
dict(portal_status_message=context.Base_translateString(str(counter) + " object(s) converted.")))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
17 18
\ 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