Commit 22a63421 authored by Jérome Perrin's avatar Jérome Perrin

- fix wrong condition for skip_invalidated_bank_accounts, and change it's default

value to false, by default we show all bank accounts (we may want to make
reports on old invalidated accounts).
- only consider bank accounts inside organisations, bank account inside a
  person is considered as a personal bank account, even if the person is member
  of the same group.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25980 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 426b4ff2
...@@ -53,8 +53,7 @@ ...@@ -53,8 +53,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from ZTUtils import LazyFilter\n <value> <string>portal = context.getPortalObject()\n
portal = context.getPortalObject()\n
\n \n
if not organisation:\n if not organisation:\n
organisation = portal.portal_preferences\\\n organisation = portal.portal_preferences\\\n
...@@ -70,8 +69,8 @@ search_kw = {\n ...@@ -70,8 +69,8 @@ search_kw = {\n
\'portal_type\': portal.getPortalPaymentNodeTypeList(),\n \'portal_type\': portal.getPortalPaymentNodeTypeList(),\n
}\n }\n
\n \n
if not skip_invalidated_bank_accounts:\n if skip_invalidated_bank_accounts:\n
search_kw[\'validation_state\'] = \'!=validated\'\n search_kw[\'validation_state\'] = \'!=invalidated\'\n
\n \n
if group_value is None:\n if group_value is None:\n
search_kw[\'parent_uid\'] = organisation_value.getUid()\n search_kw[\'parent_uid\'] = organisation_value.getUid()\n
...@@ -81,6 +80,7 @@ else:\n ...@@ -81,6 +80,7 @@ else:\n
uid_list.append(group_value.getUid())\n uid_list.append(group_value.getUid())\n
group_value = group_value.getParentValue()\n group_value = group_value.getParentValue()\n
search_kw[\'parent_strict_group_uid\'] = uid_list\n search_kw[\'parent_strict_group_uid\'] = uid_list\n
search_kw[\'parent_portal_type\'] = \'Organisation\'\n
\n \n
item_list = [(\'\', \'\')]\n item_list = [(\'\', \'\')]\n
for bank in portal.portal_catalog(**search_kw):\n for bank in portal.portal_catalog(**search_kw):\n
...@@ -111,7 +111,7 @@ return item_list\n ...@@ -111,7 +111,7 @@ return item_list\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>organisation=None, skip_invalidated_bank_accounts=1</string> </value> <value> <string>organisation=None, skip_invalidated_bank_accounts=0</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -139,8 +139,6 @@ return item_list\n ...@@ -139,8 +139,6 @@ return item_list\n
<tuple> <tuple>
<string>organisation</string> <string>organisation</string>
<string>skip_invalidated_bank_accounts</string> <string>skip_invalidated_bank_accounts</string>
<string>ZTUtils</string>
<string>LazyFilter</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
...@@ -167,7 +165,7 @@ return item_list\n ...@@ -167,7 +165,7 @@ return item_list\n
<value> <value>
<tuple> <tuple>
<none/> <none/>
<int>1</int> <int>0</int>
</tuple> </tuple>
</value> </value>
</item> </item>
......
886 887
\ No newline at end of file \ No newline at end of file
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