[Erp5-report] r23506 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Sep 9 11:56:31 CEST 2008
Author: jerome
Date: Tue Sep 9 11:56:23 2008
New Revision: 23506
URL: http://svn.erp5.org?rev=23506&view=rev
Log:
change the way to check if an account can be proposed on an accounting transction line, getProperty is not supposed to do acquisition, so getProperty('simulation_state') on an accounting transaction line will always return the default. Call getSimulationState directly (which is actually acquired from parent transaction)
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml?rev=23506&r1=23505&r2=23506&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml Tue Sep 9 11:56:23 2008
@@ -130,7 +130,8 @@
filter_dict = {}\n
\n
# we don\'t filter in existing transactions or report / search dialogs\n
- if simulation_state not in (\'delivered\', \'cancelled\', \'no_simulation_state\'):\n
+ if simulation_state not in (\'delivered\', \'stopped\',\n
+ \'cancelled\', \'no_simulation_state\'):\n
filter_dict[\'validation_state\'] = (\'draft\', \'validated\')\n
\n
item_list = cat.getCategoryMemberItemList(\n
@@ -147,13 +148,15 @@
\n
# the cache vary with the simulation state of the current transaction,\n
# to display all accounts when the transaction is already delivered.\n
+simulation_state = \'no_simulation_state\'\n
+if hasattr(context, \'getSimulationState\'):\n
+ simulation_state = context.getSimulationState()\n
item_list = getItemList( category=category,\n
portal_path=context.getPortalObject().getPhysicalPath(),\n
mirror=mirror,\n
omit_filter=omit_filter, # XXX possible optim: only one cache if omit_filter\n
user_name=str(getSecurityManager().getUser()),\n
- simulation_state=context.getProperty(\n
- \'simulation_state\', \'no_simulation_state\') )\n
+ simulation_state=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
@@ -235,9 +238,10 @@
<string>sort</string>
<string>None</string>
<string>getItemList</string>
+ <string>simulation_state</string>
+ <string>hasattr</string>
<string>str</string>
<string>item_list</string>
- <string>hasattr</string>
<string>_getiter_</string>
<string>node</string>
<string>append</string>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=23506&r1=23505&r2=23506&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Tue Sep 9 11:56:23 2008
@@ -1,1 +1,1 @@
-764
+765
More information about the Erp5-report
mailing list