From fd7e1b9e49748667127fa0f5b6680ae917f58b39 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Tue, 13 Mar 2007 15:46:21 +0000 Subject: [PATCH] Add support for emission_letter filtering. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13406 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../CounterModule_getVaultTransactionList.xml | 14 ++++++++++++-- bt5/erp5_banking_core/bt/revision | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_getVaultTransactionList.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_getVaultTransactionList.xml index c1c7c0475a..f9b223f499 100644 --- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_getVaultTransactionList.xml +++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CounterModule_getVaultTransactionList.xml @@ -117,8 +117,15 @@ if kw.has_key("explanation_uid"):\n inventory_kw[\'explanation_uid\'] = kw[\'explanation_uid\']\n if len(kw[\'explanation_uid\'])==0:\n return total_inventory_list\n -if kw.has_key("cash_status"):\n - inventory_kw[\'variation_text\'] = "%%cash_status/%s%%" % kw[\'cash_status\']\n +kw_has_cash_status = kw.has_key("cash_status")\n +kw_has_emission_letter = kw.has_key("emission_letter")\n +if kw_has_cash_status or kw_has_emission_letter:\n + variation_text_list = [\'%\']\n + if kw_has_cash_status:\n + variation_text_list.append("cash_status/%s%%" % kw[\'cash_status\'])\n + if kw_has_emission_letter:\n + variation_text_list.append("emission_letter/%s%%" % kw[\'emission_letter\'])\n + inventory_kw[\'variation_text\'] = \'\'.join(variation_text_list)\n \n if at_date is not None:\n # XXX this make sure we look at the end of the day\n @@ -317,6 +324,9 @@ return repr([x for x in total_inventory_list])\n <string>_getattr_</string> <string>_getitem_</string> <string>len</string> + <string>kw_has_cash_status</string> + <string>kw_has_emission_letter</string> + <string>variation_text_list</string> <string>column_list</string> <string>_getiter_</string> <string>_apply_</string> diff --git a/bt5/erp5_banking_core/bt/revision b/bt5/erp5_banking_core/bt/revision index aa59885c83..aca544d017 100644 --- a/bt5/erp5_banking_core/bt/revision +++ b/bt5/erp5_banking_core/bt/revision @@ -1 +1 @@ -143 \ No newline at end of file +145 \ No newline at end of file -- 2.30.9