Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
preetwinder
erp5
Commits
15cb7870
Commit
15cb7870
authored
Jul 29, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_scalability_data: Add script to clone 1000 scalability users
parent
661e6d02
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
1 deletion
+84
-1
bt5/erp5_scalability_data/PathTemplateItem/portal_skins/custom/clone_scalability_user.xml
...mplateItem/portal_skins/custom/clone_scalability_user.xml
+81
-0
bt5/erp5_scalability_data/bt/revision
bt5/erp5_scalability_data/bt/revision
+1
-1
bt5/erp5_scalability_data/bt/template_keep_path_list
bt5/erp5_scalability_data/bt/template_keep_path_list
+1
-0
bt5/erp5_scalability_data/bt/template_path_list
bt5/erp5_scalability_data/bt/template_path_list
+1
-0
No files found.
bt5/erp5_scalability_data/PathTemplateItem/portal_skins/custom/clone_scalability_user.xml
0 → 100644
View file @
15cb7870
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
module = context.person_module\n
my_user = module.scalability_user\n
\n
for i in xrange(0,1000):\n
new_user = my_user.Base_createCloneDocument(batch_mode=1)\n
name = \'scalability_user_%d\' %i\n
new_user.setId(name)\n
new_user.setTitle(name)\n
new_user.setReference(name)\n
# new_user.setSubordinationValue(some_organisation_document)\n
new_user.validate()\n
assignment = new_user.objectValues(portal_type=\'Assignment\')[0]\n
assignment.open()\n
return 1\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
clone_scalability_user
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_scalability_data/bt/revision
View file @
15cb7870
7
\ No newline at end of file
8
\ No newline at end of file
bt5/erp5_scalability_data/bt/template_keep_path_list
View file @
15cb7870
portal_skins/custom/clone_scalability_user
organisation_module/idexen
organisation_module/idexen/**
person_module/scalability_user
...
...
bt5/erp5_scalability_data/bt/template_path_list
View file @
15cb7870
...
...
@@ -8,6 +8,7 @@ person_module/john_rock
person_module/john_rock/*
person_module/scalability_user
person_module/scalability_user/*
portal_skins/custom/clone_scalability_user
product_module/blue_led
product_module/blue_led/*
product_module/green_led
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment