diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml index fc9710d548e3df05d805830a8233c301cfe341cb..261b3c127f9c3280327d493071ef3dea4952ec03 100644 --- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml +++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_getNodeItemList.xml @@ -130,7 +130,8 @@ def getItemList(category=None, portal_path=None, mirror=0, omit_filter=0,\n 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 @@ getItemList = CachingMethod(getItemList,\n \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 @@ return item_list\n <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> diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision index 5d5ad96f9fa59e86a02bf299511221da15f5511a..4f1a32f19046cfd3b06fa1a3728d48f68b0a8ac7 100644 --- a/bt5/erp5_accounting/bt/revision +++ b/bt5/erp5_accounting/bt/revision @@ -1 +1 @@ -764 \ No newline at end of file +765 \ No newline at end of file