[Erp5-report] r10285 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Sep 25 13:44:23 CEST 2006
Author: jerome
Date: Mon Sep 25 13:44:19 2006
New Revision: 10285
URL: http://svn.erp5.org?rev=10285&view=rev
Log:
fix AccountingTransactionLine_getNodeItemList to use strict_membership only
when we are able to get an account_type from the line id.
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml?rev=10285&r1=10284&r2=10285&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml Mon Sep 25 13:44:19 2006
@@ -74,6 +74,7 @@
value, the list will be filtered for the mirror node.\n
"""\n
from Products.ERP5Type.Cache import CachingMethod\n
+portal = context.getPortalObject()\n
\n
if not mirror:\n
category_dict = {\n
@@ -96,7 +97,7 @@
\'bank\': \'account_type/asset/cash\',\n
\'cash\': \'account_type/asset/cash\', }\n
\n
-category = category_dict.get(context.getId(), \'account_type\')\n
+category = category_dict.get(context.getId())\n
\n
display_cache = {}\n
display_funct = context.Account_getFormattedTitle\n
@@ -112,7 +113,10 @@
def getItemList(category=None, portal_path=None, mirror=0,\n
user_name=None, simulation_state=None):\n
"""Returns a list of Account path items. """\n
- cat = context.portal_categories.resolveCategory(category)\n
+ if category is not None:\n
+ cat = portal.portal_categories.resolveCategory(category)\n
+ else:\n
+ cat = portal.portal_categories.account_type\n
filter_dict = {}\n
\n
# we don\'t filter in existing transactions or report / search dialogs\n
@@ -124,7 +128,9 @@
base=0,\n
display_method=display,\n
sort_method=sort,\n
- strict_membership=1,\n
+ # we don\'t want strict membership if now category\n
+ # has been found.\n
+ strict_membership=(category is not None),\n
filter=filter_dict)\n
return item_list\n
\n
@@ -197,9 +203,10 @@
<string>mirror</string>
<string>Products.ERP5Type.Cache</string>
<string>CachingMethod</string>
- <string>category_dict</string>
<string>_getattr_</string>
<string>context</string>
+ <string>portal</string>
+ <string>category_dict</string>
<string>category</string>
<string>display_cache</string>
<string>display_funct</string>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=10285&r1=10284&r2=10285&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Mon Sep 25 13:44:19 2006
@@ -1,1 +1,1 @@
-51
+52
More information about the Erp5-report
mailing list