Commit 83ed93c3 authored by Sebastien Robin's avatar Sebastien Robin

added init script for Organisation and Person

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12692 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f502dfe4
......@@ -459,6 +459,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
......@@ -545,7 +549,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>Category_getSortedCategoryChildValueList</string> </value>
<value> <string>objectValues</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -213,7 +213,7 @@
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
......
......@@ -98,7 +98,7 @@
from Products.ERP5Type.Cache import CachingMethod\n
\n
def getVaultItemList(vault_type=None, exclude_vault_type=None,\n
user_site=1, leaf_node=1, strict_membership=0, assignment_list=None, \n
user_site=1, leaf_node=1, strict_membership=0, assignment_list=None,\n
site_list=None, with_base=1, all=0, first_level=0,main_agency=0,\n
exclude_site_list=None):\n
\n
......@@ -144,7 +144,7 @@ def getVaultItemList(vault_type=None, exclude_vault_type=None,\n
get_cat_value = context.portal_categories.getCategoryValue\n
for site in site_list:\n
site_object = get_cat_value(site, base_category=\'site\')\n
\n
\n
vault_type_value_list = [context.portal_categories.restrictedTraverse(\'vault_type/%s\' % x) for x in vault_type]\n
vault_type_uid_list = [x.getUid() for x in vault_type_value_list]\n
catalog_kw = {}\n
......@@ -187,7 +187,15 @@ def getVaultItemList(vault_type=None, exclude_vault_type=None,\n
vault_dict = {}\n
# Transform each line of the vault list\n
keep_level = []\n
erp5_site = context.getPortalObject()\n
mode_test = 0\n
if hasattr(erp5_site, \'functionnal_test_mode\'):\n
if getattr(erp5_site, \'functionnal_test_mode\') == 1:\n
mode_test = 1\n
for vault_item in vault_list:\n
# do not include testsite if not in test mode\n
if mode_test == 0 and \'testsite\' in vault_item[1]:\n
continue\n
title_path_list = vault_item[0].split(\'/\')\n
id_path_list = vault_item[1].split(\'/\')[1:] # exclude the base category\n
path_len = len(id_path_list)\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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 encoding="cdata"><![CDATA[
user_site_list = context.Baobab_getUserAssignedSiteList()\n
if len(user_site_list)>0:\n
site = context.Baobab_getVaultSite(user_site_list[0])\n
site_url = site.getRelativeUrl()\n
context.setSite(site_url)\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>user_site_list</string>
<string>len</string>
<string>_getitem_</string>
<string>site</string>
<string>site_url</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Organisation_init</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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 encoding="cdata"><![CDATA[
user_site_list = context.Baobab_getUserAssignedSiteList()\n
if len(user_site_list)>0:\n
site = context.Baobab_getVaultSite(user_site_list[0])\n
site_url = site.getRelativeUrl()\n
context.setSite(site_url)\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>kw</string>
<string>_getattr_</string>
<string>context</string>
<string>user_site_list</string>
<string>len</string>
<string>_getitem_</string>
<string>site</string>
<string>site_url</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Person_init</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
127
\ No newline at end of file
129
\ 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