[Erp5-report] r40183 jerome - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_s...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Nov 10 17:42:07 CET 2010
Author: jerome
Date: Wed Nov 10 17:42:07 2010
New Revision: 40183
URL: http://svn.erp5.org?rev=40183&view=rev
Log:
support GAP categories without references
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapItemList.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapItemList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapItemList.xml?rev=40183&r1=40182&r2=40183&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapItemList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Account_getGapItemList.xml [utf8] Wed Nov 10 17:42:07 2010
@@ -60,27 +60,31 @@ categories from all available GAP.\n
display_cache = {}\n
def display(x):\n
if x not in display_cache:\n
- gap_id = x.getReference() or x.getId()\n
- display_cache[x] = \'%s - %s\' % (gap_id, x.getShortTitle() or x.getTitle())\n
- return display_cache[x]\n
+ gap_id = x.getReference()\n
+ if gap_id:\n
+ display_cache[x] = \'%s - %s\' % (gap_id,\n
+ x.getShortTitle() or x.getTitle())\n
+ else:\n
+ display_cache[x] = x.getIndentedTitle()\n
\n
-def sort(x,y):\n
- return cmp(display(x), display(y))\n
+ return display_cache[x]\n
\n
-def getGapItemList(only_preferred_gap): \n
+def getGapItemList(only_preferred_gap):\n
ctool = context.getPortalObject().portal_categories\n
if only_preferred_gap:\n
gap_root = context.getPortalObject().portal_preferences\\\n
.getPreferredAccountingTransactionGap()\n
if gap_root:\n
return ctool.resolveCategory(gap_root).getCategoryChildItemList(\n
- base=False, is_self_excluded=True, display_method=display, sort_method=sort)\n
+ base=False, is_self_excluded=True, display_method=display,\n
+ local_sort_id=(\'int_index\', \'reference\', \'id\'))\n
\n
- result = [] \n
+ result = []\n
for country in ctool.gap.contentValues():\n
for gap_root in country.contentValues():\n
result.extend(gap_root.getCategoryChildItemList(\n
- base=False, is_self_excluded=True, display_method=display, sort_method=sort))\n
+ base=False, is_self_excluded=True, display_method=display,\n
+ local_sort_id=(\'int_index\', \'reference\', \'id\')))\n
return result\n
\n
from Products.ERP5Type.Cache import CachingMethod\n
@@ -105,6 +109,46 @@ return getGapItemList(only_preferred_gap
</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>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>only_preferred_gap</string>
+ <string>display_cache</string>
+ <string>display</string>
+ <string>getGapItemList</string>
+ <string>Products.ERP5Type.Cache</string>
+ <string>CachingMethod</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <tuple>
+ <int>1</int>
+ </tuple>
+ </value>
+ </item>
+ <item>
<key> <string>id</string> </key>
<value> <string>Account_getGapItemList</string> </value>
</item>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=40183&r1=40182&r2=40183&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Wed Nov 10 17:42:07 2010
@@ -1 +1 @@
-1383
\ No newline at end of file
+1385
\ No newline at end of file
More information about the Erp5-report
mailing list