Commit 4f09471c authored by Benjamin Blanc's avatar Benjamin Blanc

erp5_scalability_data: add script init

parent 40aca005
...@@ -51,9 +51,17 @@ ...@@ -51,9 +51,17 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n <value> <string>portal = context.getPortalObject()\n
\n
# Update roles\n
portal_type = portal.searchFolder(title=\'portal_types\')[0]\n
portal_type.searchFolder(title=\'Person\')[0].updateRoleMapping()\n
portal_type.searchFolder(title=\'Product\')[0].updateRoleMapping()\n
portal_type.searchFolder(title=\'Organisation\')[0].updateRoleMapping()\n
portal_type.searchFolder(title=\'Sale Trade Condition\')[0].updateRoleMapping()\n
\n
# Clone users\n
module = context.person_module\n module = context.person_module\n
my_user = module.scalability_user\n my_user = module.scalability_user\n
\n
for i in xrange(0,50):\n for i in xrange(0,50):\n
new_user = my_user.Base_createCloneDocument(batch_mode=1)\n new_user = my_user.Base_createCloneDocument(batch_mode=1)\n
name = \'scalability_user_%d\' %i\n name = \'scalability_user_%d\' %i\n
...@@ -73,7 +81,7 @@ return 1\n ...@@ -73,7 +81,7 @@ return 1\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>clone_scalability_user</string> </value> <value> <string>init_scalability</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
10 11
\ No newline at end of file \ No newline at end of file
portal_skins/custom/clone_scalability_user portal_skins/custom/init_scalability
organisation_module/idexen organisation_module/idexen
organisation_module/idexen/** organisation_module/idexen/**
person_module/scalability_user person_module/scalability_user
......
...@@ -8,7 +8,7 @@ person_module/john_rock ...@@ -8,7 +8,7 @@ person_module/john_rock
person_module/john_rock/* person_module/john_rock/*
person_module/scalability_user person_module/scalability_user
person_module/scalability_user/* person_module/scalability_user/*
portal_skins/custom/clone_scalability_user portal_skins/custom/init_scalability
product_module/blue_led product_module/blue_led
product_module/blue_led/* product_module/blue_led/*
product_module/green_led product_module/green_led
......
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