Commit 963e0667 authored by Jérome Perrin's avatar Jérome Perrin

dont' fail if an organisation does not have a group

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34936 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1acaa3cb
...@@ -81,13 +81,14 @@ if organisation:\n ...@@ -81,13 +81,14 @@ if organisation:\n
# else we lookup in parent organisations\n # else we lookup in parent organisations\n
if not bank_account_list:\n if not bank_account_list:\n
group_value = organisation_value.getGroupValue(None)\n group_value = organisation_value.getGroupValue(None)\n
uid_list = []\n if group_value is not None:\n
while group_value.getPortalType() != \'Base Category\':\n uid_list = []\n
uid_list.append(group_value.getUid())\n while group_value.getPortalType() != \'Base Category\':\n
group_value = group_value.getParentValue()\n uid_list.append(group_value.getUid())\n
search_kw[\'parent_strict_group_uid\'] = uid_list\n group_value = group_value.getParentValue()\n
search_kw[\'parent_portal_type\'] = \'Organisation\'\n search_kw[\'parent_strict_group_uid\'] = uid_list\n
bank_account_list = portal.portal_catalog(**search_kw)\n search_kw[\'parent_portal_type\'] = \'Organisation\'\n
bank_account_list = portal.portal_catalog(**search_kw)\n
\n \n
else:\n else:\n
if section_category is None:\n if section_category is None:\n
......
1195 1198
\ 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