[Erp5-report] r43309 jerome - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_s...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Feb 14 12:04:41 CET 2011


Author: jerome
Date: Mon Feb 14 12:04:41 2011
New Revision: 43309

URL: http://svn.erp5.org?rev=43309&view=rev
Log:
take into account the preferred gap in the cache

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=43309&r1=43308&r2=43309&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] Mon Feb 14 12:04:41 2011
@@ -57,6 +57,8 @@ categories from the GAP set in preferenc
 categories from all available GAP.\n
 """\n
 \n
+portal = context.getPortalObject()\n
+\n
 display_cache = {}\n
 def display(x):\n
   if x not in display_cache:\n
@@ -69,11 +71,9 @@ def display(x):\n
 \n
   return display_cache[x]\n
 \n
-def getGapItemList(only_preferred_gap):\n
-  ctool = context.getPortalObject().portal_categories\n
+def getGapItemList(only_preferred_gap, gap_root=None):\n
+  ctool = portal.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,\n
@@ -89,7 +89,8 @@ def getGapItemList(only_preferred_gap):\
 \n
 from Products.ERP5Type.Cache import CachingMethod\n
 getGapItemList = CachingMethod(getGapItemList, id=\'Account_getGapItemList\', cache_factory=\'erp5_content_long\')\n
-return getGapItemList(only_preferred_gap=only_preferred_gap)\n
+return getGapItemList(only_preferred_gap=only_preferred_gap,\n
+                gap_root=portal.portal_preferences.getPreferredAccountingTransactionGap())\n
 </string> </value>
         </item>
         <item>

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=43309&r1=43308&r2=43309&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Mon Feb 14 12:04:41 2011
@@ -1 +1 @@
-1437
\ No newline at end of file
+1438
\ No newline at end of file



More information about the Erp5-report mailing list