Commit 3b82db91 authored by Vincent Pelletier's avatar Vincent Pelletier

As Bank Account state is not historicised, it is not possible to do a report...

As Bank Account state is not historicised, it is not possible to do a report on openned bank account at a given date (in past), which might be required. Make this possible by listing accounts both in opened and closed states.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29472 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 77726bd1
......@@ -76,11 +76,11 @@ if reference is None:\n
raise ValueError, message\n
\n
#context.log(\'reference\',reference)\n
account_list = catalog(string_index=reference, portal_type=portal_type, validation_state=\'valid\')\n
# context.log(\'sql src\',catalog(string_index=reference, portal_type=portal_type, validation_state=\'valid\',src__=1))\n
account_list = catalog(string_index=reference, portal_type=portal_type, validation_state=(\'valid\', \'closed\'))\n
# context.log(\'sql src\',catalog(string_index=reference, portal_type=portal_type, validation_state=(\'valid\', \'closed\'),src__=1))\n
# context.log(\'len 1\',len(account_list))\n
if len(account_list) == 0:\n
account_list = catalog(string_index="%%%s%%" % reference, portal_type=portal_type, validation_state=\'valid\')\n
account_list = catalog(string_index="%%%s%%" % reference, portal_type=portal_type, validation_state=(\'valid\', \'closed\'))\n
#context.log(\'len 2\',len(account_list))\n
if len(account_list) == 0:\n
message = Message(domain="ui", message="No bank account have this reference")\n
......
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