From ea56ba9179ce559069f53b22847c793dfd0cad3e Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Fri, 30 Mar 2007 06:20:56 +0000
Subject: [PATCH] use selection_name instead of selection.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13806 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../AccountModule_getMirrorAccountUrl.xml              | 10 ++++------
 .../AccountModule_getTransactionListUrl.xml            | 10 ++++------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getMirrorAccountUrl.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getMirrorAccountUrl.xml
index 5188c8a29a..f748c8b8fd 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getMirrorAccountUrl.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getMirrorAccountUrl.xml
@@ -70,14 +70,13 @@
             <key> <string>_body</string> </key>
             <value> <string encoding="cdata"><![CDATA[
 
-index = selection.getIndex()\n
-name = selection.getName()\n
+index = context.portal_selections.getSelectionIndexFor(selection_name)\n
 object = brain.getObject()\n
 object = object.getDestinationValue()\n
 if object is None:\n
   url = None\n
 else:\n
-  url = object.absolute_url() + \'/view?selection_index=%s&selection_name=%s&reset=1\' % (index, name)\n
+  url = object.absolute_url() + \'/view?selection_index=%s&selection_name=%s&reset=1\' % (index, selection_name)\n
 \n
 return url\n
 
@@ -98,7 +97,7 @@ return url\n
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>brain=None, selection=None</string> </value>
+            <value> <string>brain=None, selection=None, selection_name=None</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -118,7 +117,7 @@ return url\n
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>2</int> </value>
+                        <value> <int>3</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
@@ -128,7 +127,6 @@ return url\n
                             <string>selection</string>
                             <string>_getattr_</string>
                             <string>index</string>
-                            <string>name</string>
                             <string>object</string>
                             <string>None</string>
                             <string>url</string>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getTransactionListUrl.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getTransactionListUrl.xml
index af81855b54..0a081b0ee0 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getTransactionListUrl.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getTransactionListUrl.xml
@@ -70,8 +70,7 @@
             <key> <string>_body</string> </key>
             <value> <string>from ZTUtils import make_query\n
 \n
-index = selection.getIndex()\n
-name = selection.getName()\n
+index = context.portal_selections.getSelectionIndexFor(selection_name)\n
 object = brain.getObject()\n
 \n
 # this is for domain_tree mode\n
@@ -80,7 +79,7 @@ if object.getPortalType() == "Category" : \n
 \n
 method = \'Account_viewAccountingTransactionList\'\n
 kw = { \'selection_index\': str(index),\n
-       \'selection_name\' : name, \n
+       \'selection_name\' : selection_name, \n
        \'reset\' : \'1\', \n
      }\n
 \n
@@ -101,7 +100,7 @@ return object.getPath() + \'/\' + method + \'?\' + make_query(kw)\n
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>brain=None, selection=None, **kwd</string> </value>
+            <value> <string>brain=None, selection=None, selection_name=None, **kwd</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -121,7 +120,7 @@ return object.getPath() + \'/\' + method + \'?\' + make_query(kw)\n
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>2</int> </value>
+                        <value> <int>3</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
@@ -134,7 +133,6 @@ return object.getPath() + \'/\' + method + \'?\' + make_query(kw)\n
                             <string>make_query</string>
                             <string>_getattr_</string>
                             <string>index</string>
-                            <string>name</string>
                             <string>object</string>
                             <string>method</string>
                             <string>str</string>
-- 
2.30.9