From 27a9cf72d19002ad4b1de28d24eb1dda9f40472d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 8 Feb 2006 18:39:04 +0000
Subject: [PATCH] do not try to deliver already delivered transaction. pass an
 unicode string to Localizer

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5632 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../scripts/AccountingPeriod_DeliverTransactions.xml         | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/AccountingPeriod_DeliverTransactions.xml b/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/AccountingPeriod_DeliverTransactions.xml
index 5444a56de2..af7af2c346 100755
--- a/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/AccountingPeriod_DeliverTransactions.xml
+++ b/bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_period_workflow/scripts/AccountingPeriod_DeliverTransactions.xml
@@ -74,7 +74,7 @@ closing_period = state_change.object\n
 portal = closing_period.getPortalObject()\n
 N_ = portal.Base_translateString\n
 accounting_module = portal.accounting_module\n
-valid_states = [\'cancelled\', \'stopped\', \'delivered\']\n
+valid_states = [\'cancelled\', \'stopped\']\n
 \n
 start_date = closing_period.getStartDate()\n
 stop_date = closing_period.getStopDate()\n
@@ -85,7 +85,7 @@ search_params = { \'delivery.start_date\' : \'>= %s\' % start_date,\n
 transaction_list = accounting_module.searchFolder( **search_params )\n
 \n
 comment=N_("Closing period ${period_title}",\n
-                    mapping={\'period_title\': closing_period.getTitle()})\n
+                    mapping={\'period_title\': unicode(closing_period.getTitle(), \'utf8\')})\n
 \n
 section_uid = closing_period.getParentValue().getUid()\n
 for transaction in transaction_list :\n
@@ -162,6 +162,7 @@ closing_period.activate( \n
                             <string>search_params</string>
                             <string>_apply_</string>
                             <string>transaction_list</string>
+                            <string>unicode</string>
                             <string>comment</string>
                             <string>section_uid</string>
                             <string>_getiter_</string>
-- 
2.30.9