From 83ed93c30142caf128ee1e8c70df493520ae383f Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Wed, 14 Feb 2007 09:56:31 +0000 Subject: [PATCH] added init script for Organisation and Person git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12692 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../BaseCategory_view/listbox.xml | 6 +- .../my_category_type_list%20.xml | 2 +- .../Delivery_getVaultItemList.xml | 12 +- .../erp5_banking_core/Organisation_init.xml | 163 ++++++++++++++++++ .../erp5_banking_core/Person_init.xml | 163 ++++++++++++++++++ bt5/erp5_banking_core/bt/revision | 2 +- 6 files changed, 343 insertions(+), 5 deletions(-) create mode 100644 bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Organisation_init.xml create mode 100644 bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Person_init.xml diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BaseCategory_view/listbox.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BaseCategory_view/listbox.xml index d24a187d09..804a3af204 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BaseCategory_view/listbox.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BaseCategory_view/listbox.xml @@ -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> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BaseCategory_view/my_category_type_list%20.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BaseCategory_view/my_category_type_list%20.xml index cd1cc9fc1c..02f5d82ab8 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BaseCategory_view/my_category_type_list%20.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/BaseCategory_view/my_category_type_list%20.xml @@ -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> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Delivery_getVaultItemList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Delivery_getVaultItemList.xml index 6d56603f8a..aab83884c7 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Delivery_getVaultItemList.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Delivery_getVaultItemList.xml @@ -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 diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Organisation_init.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Organisation_init.xml new file mode 100644 index 0000000000..633dc13436 --- /dev/null +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Organisation_init.xml @@ -0,0 +1,163 @@ +<?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> diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Person_init.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Person_init.xml new file mode 100644 index 0000000000..1a172e6b2f --- /dev/null +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Person_init.xml @@ -0,0 +1,163 @@ +<?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> diff --git a/bt5/erp5_banking_core/bt/revision b/bt5/erp5_banking_core/bt/revision index 405e057083..6d3e9dc78d 100644 --- a/bt5/erp5_banking_core/bt/revision +++ b/bt5/erp5_banking_core/bt/revision @@ -1 +1 @@ -127 \ No newline at end of file +129 \ No newline at end of file -- 2.30.9