[Erp5-report] r24834 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Dec 8 15:25:40 CET 2008
Author: romain
Date: Mon Dec 8 15:25:40 2008
New Revision: 24834
URL: http://svn.erp5.org?rev=24834&view=rev
Log:
Return the list of Bank Account from the group of the preferred organisation, in order to handle the group hierarchy.
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountItemList.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountItemList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountItemList.xml?rev=24834&r1=24833&r2=24834&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountItemList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getBankAccountItemList.xml [utf8] Mon Dec 8 15:25:40 2008
@@ -63,14 +63,28 @@
if not organisation:\n
return [(\'\', \'\')]\n
\n
+organisation_value = portal.restrictedTraverse(organisation)\n
+group_value = organisation_value.getGroupValue(None)\n
\n
-organisation_value = portal.restrictedTraverse(organisation)\n
+search_kw = {\n
+ \'portal_type\': portal.getPortalPaymentNodeTypeList(),\n
+}\n
+\n
+if not skip_invalidated_bank_accounts:\n
+ search_kw[\'validation_state\'] = \'!=validated\'\n
+\n
+if group_value is None:\n
+ search_kw[\'parent_uid\'] = organisation_value.getUid()\n
+else:\n
+ uid_list = []\n
+ while group_value.getPortalType() != \'Base Category\':\n
+ uid_list.append(group_value.getUid())\n
+ group_value = group_value.getParentValue()\n
+ search_kw[\'parent_strict_group_uid\'] = uid_list\n
+\n
item_list = [(\'\', \'\')]\n
-for bank in LazyFilter(organisation_value.contentValues(\n
- portal_type=portal.getPortalPaymentNodeTypeList()), skip=\'\'):\n
-\n
- if skip_invalidated_bank_accounts and bank.getValidationState() == \'invalidated\':\n
- continue\n
+for bank in portal.portal_catalog(**search_kw):\n
+ bank = bank.getObject()\n
\n
if bank.getReference() and bank.getTitle() \\\n
and bank.getReference() != bank.getTitle():\n
@@ -131,8 +145,14 @@
<string>context</string>
<string>portal</string>
<string>organisation_value</string>
+ <string>None</string>
+ <string>group_value</string>
+ <string>search_kw</string>
+ <string>_write_</string>
+ <string>uid_list</string>
<string>item_list</string>
<string>_getiter_</string>
+ <string>_apply_</string>
<string>bank</string>
</tuple>
</value>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=24834&r1=24833&r2=24834&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Mon Dec 8 15:25:40 2008
@@ -1,1 +1,1 @@
-824
+825
More information about the Erp5-report
mailing list