Commit 5e46b1b2 authored by Aurel's avatar Aurel

back to previous version, no need to check if bic code is defined on bank account

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20816 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 68a19c22
......@@ -71,17 +71,9 @@ orga_id = "site_%3s" %(site.getCodification())\n
organisation = context.organisation_module[orga_id]\n
\n
account_list = [x for x in organisation.objectValues(portal_type=\'Bank Account\') if x.getValidationState() == \'valid\']\n
if len(account_list)==0:\n
if len(account_list)!=1:\n
raise ValueError, \'Must not get %d account for the organisation %s\' %(len(account_list),organisation.getTitle())\n
for acc in account_list:\n
acc = acc.getObject()\n
if acc.getBicCode() is not None:\n
return acc\n
\n
\n
raise ValueError, "No account with bic code found"\n
\n
#return account_list[0]\n
return account_list[0]\n
</string> </value>
</item>
<item>
......@@ -145,8 +137,6 @@ raise ValueError, "No account with bic code found"\n
<string>account_list</string>
<string>len</string>
<string>ValueError</string>
<string>acc</string>
<string>None</string>
</tuple>
</value>
</item>
......
435
\ No newline at end of file
436
\ 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