Commit 31fe407f authored by Fabien Devaux's avatar Fabien Devaux

Changes to use formatting script.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7352 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 932be8ce
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value> <value> <string encoding="base64">bfINCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -66,8 +66,7 @@ ...@@ -66,8 +66,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>def display(x):\n <value> <string>display = context.Account_getFormattedTitle\n
return "%s - %s" % (x.getId(), x.getTitle())\n
\n \n
def sort(x,y):\n def sort(x,y):\n
return cmp(display(x), display(y))\n return cmp(display(x), display(y))\n
...@@ -128,10 +127,10 @@ return gap_item_list[:-1]\n ...@@ -128,10 +127,10 @@ return gap_item_list[:-1]\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>display</string>
<string>sort</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>display</string>
<string>sort</string>
<string>gap_root</string> <string>gap_root</string>
<string>KeyError</string> <string>KeyError</string>
<string>getGapItemList</string> <string>getGapItemList</string>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>Python_magic</string> </key> <key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value> <value> <string encoding="base64">bfINCg==</string> </value>
</item> </item>
<item> <item>
<key> <string>Script_magic</string> </key> <key> <string>Script_magic</string> </key>
...@@ -84,11 +84,10 @@ else:\n ...@@ -84,11 +84,10 @@ else:\n
category = \'portal_categories/account_type\'\n category = \'portal_categories/account_type\'\n
\n \n
display_dict = {}\n display_dict = {}\n
display_funct = context.Account_getFormattedTitle\n
\n
def display(x):\n def display(x):\n
if x not in display_dict:\n display_dict[x] = display_funct(x)\n
gap_id = x.getGapId()\n
account_title = x.getTitle()\n
display_dict[x] = "%s - %s" % (gap_id, account_title)\n
return display_dict[x]\n return display_dict[x]\n
\n \n
def sort(x,y):\n def sort(x,y):\n
...@@ -157,6 +156,7 @@ return getItemList(category=category, portal_path=portal_path)\n ...@@ -157,6 +156,7 @@ return getItemList(category=category, portal_path=portal_path)\n
<string>_getitem_</string> <string>_getitem_</string>
<string>category</string> <string>category</string>
<string>display_dict</string> <string>display_dict</string>
<string>display_funct</string>
<string>display</string> <string>display</string>
<string>sort</string> <string>sort</string>
<string>None</string> <string>None</string>
......
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