From 0670f6a07ceafd089b7f7905f5ac105a6c647e8e Mon Sep 17 00:00:00 2001 From: Kevin Deldycke <kevin@nexedi.com> Date: Thu, 1 Jun 2006 17:00:04 +0000 Subject: [PATCH] Utility script to transform gap number to gap category url. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7581 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../GAPCategory_getURLFromId.xml | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/GAPCategory_getURLFromId.xml diff --git a/bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/GAPCategory_getURLFromId.xml b/bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/GAPCategory_getURLFromId.xml new file mode 100644 index 0000000000..26259e53ac --- /dev/null +++ b/bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/GAPCategory_getURLFromId.xml @@ -0,0 +1,167 @@ +<?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>"""\n + Translates a short account number (eg 280) to a full gap category url (eg gap/2/28/280).\n +"""\n +\n +number = gap_id.strip()\n +\n +gap_url = gap_base\n +for i in range(len(number)):\n + gap_url += number[:i+1] + \'/\'\n +\n +return gap_url[:-1]\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> <string>Script (Python):/nexedi/portal_skins/erp5_accounting_l10n_fr/GAPCategory_getURLFromId</string> </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>gap_id, gap_base=\'gap/fr/pcg/\'</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>2</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>gap_id</string> + <string>gap_base</string> + <string>_getattr_</string> + <string>number</string> + <string>gap_url</string> + <string>_getiter_</string> + <string>range</string> + <string>len</string> + <string>i</string> + <string>_getitem_</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <tuple> + <string>gap/fr/pcg/</string> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>GAPCategory_getURLFromId</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> -- 2.30.9