Commit 8f9e544b authored by Jérome Perrin's avatar Jérome Perrin

make sure we always show the currently selected account on...

make sure we always show the currently selected account on AccountingTransactionLine_getNodeItemList. There might be a better way ...

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22854 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 88d08862
...@@ -147,13 +147,26 @@ getItemList = CachingMethod(getItemList,\n ...@@ -147,13 +147,26 @@ getItemList = CachingMethod(getItemList,\n
\n \n
# the cache vary with the simulation state of the current transaction,\n # the cache vary with the simulation state of the current transaction,\n
# to display all accounts when the transaction is already delivered.\n # to display all accounts when the transaction is already delivered.\n
return getItemList( category=category,\n item_list = getItemList( category=category,\n
portal_path=context.getPortalObject().getPhysicalPath(),\n portal_path=context.getPortalObject().getPhysicalPath(),\n
mirror=mirror,\n mirror=mirror,\n
omit_filter=omit_filter, # XXX possible optim: only one cache if omit_filter\n omit_filter=omit_filter, # XXX possible optim: only one cache if omit_filter\n
user_name=str(getSecurityManager().getUser()),\n user_name=str(getSecurityManager().getUser()),\n
simulation_state=context.getProperty(\n simulation_state=context.getProperty(\n
\'simulation_state\', \'no_simulation_state\') )\n \'simulation_state\', \'no_simulation_state\') )\n
\n
# make sure that the current value is included in this list, this is \n
# mostly for compatibility with old versions. XXX This is slow. \n
if omit_filter:\n
return item_list\n
\n
for node in (context.getSource(portal_type=\'Account\'),\n
context.getDestination(portal_type=\'Account\')):\n
if node:\n
if node not in [x[1] for x in item_list]:\n
return context.AccountingTransactionLine_getNodeItemList(mirror=mirror, omit_filter=1)\n
\n
return item_list\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -220,6 +233,13 @@ return getItemList( category=category,\n ...@@ -220,6 +233,13 @@ return getItemList( category=category,\n
<string>None</string> <string>None</string>
<string>getItemList</string> <string>getItemList</string>
<string>str</string> <string>str</string>
<string>item_list</string>
<string>_getiter_</string>
<string>node</string>
<string>append</string>
<string>$append0</string>
<string>x</string>
<string>_getitem_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
729 730
\ 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