Commit ac48516b authored by Benjamin Blanc's avatar Benjamin Blanc

erp5_scalability_data: add script to count number of created documents

parent 000fe501
<?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>"""\n
Return the amount of valid created documents\n
"""\n
portal = context.getPortalObject()\n
\n
person_len = len(portal.person_module.searchFolder(validation_state=\'validated\'))\n
sale_order_len = len(portal.sale_order_module.searchFolder(simulation_state=\'planned\'))\n
web_page_len = len(portal.web_page_module.searchFolder(validation_state=\'submitted\'))\n
\n
return person_len + sale_order_len + web_page_len\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>count_docs_scalability</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
22
\ No newline at end of file
23
\ No newline at end of file
......@@ -3,6 +3,7 @@ portal_skins/custom/init_scalability
portal_skins/custom/update_roles_scalability
portal_skins/custom/apply_load_balancing_scalability
portal_skins/custom/use_random_id_scalability
portal_skins/custom/count_docs_scalability
organisation_module/idexen
organisation_module/idexen/**
person_module/scalability_user
......
......@@ -10,6 +10,7 @@ person_module/scalability_user
person_module/scalability_user/*
portal_preferences/scalability_preference
portal_skins/custom/apply_load_balancing_scalability
portal_skins/custom/count_docs_scalability
portal_skins/custom/init_scalability
portal_skins/custom/update_roles_scalability
portal_skins/custom/use_random_id_scalability
......
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