From e64609481e1bd336325b656a939cc9fceb327449 Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Fri, 23 Mar 2007 14:48:22 +0000
Subject: [PATCH] some content types were missing for traveler check purchase

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13596 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../allowed_content_types.xml                               | 1 +
 .../scripts/CheckbookReception_generateItemList.xml         | 6 ++++--
 bt5/erp5_banking_check/bt/revision                          | 2 +-
 .../bt/template_portal_type_allowed_content_type_list       | 1 +
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/bt5/erp5_banking_check/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml b/bt5/erp5_banking_check/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
index 84837f6b79..abc3f1680f 100644
--- a/bt5/erp5_banking_check/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
+++ b/bt5/erp5_banking_check/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
@@ -43,6 +43,7 @@
   <item>Stop Payment</item>
  </portal_type>
  <portal_type id="Traveler Check Purchase">
+  <item>Banking Operation Line</item>
   <item>Checkbook Delivery Line</item>
  </portal_type>
  <portal_type id="Traveler Check Purchase Module">
diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml
index 9d708027f2..bc38e5eead 100644
--- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml
+++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/checkbook_reception_workflow/scripts/CheckbookReception_generateItemList.xml
@@ -201,9 +201,10 @@ for line in line_list:\n
       start_date = transaction.getStartDate()\n
       destination_section = item.getDestinationSection()\n
       item.setStartDate(start_date)\n
-      for j in xrange(reference_to_int(reference_range_min), last_reference_value + 1):\n
+      reference_list = xrange(reference_to_int(reference_range_min), last_reference_value + 1)\n
+      checkReferenceUniqueness(reference_list, model)\n
+      for j in reference_list:\n
         reference = int_to_reference(j, reference_range_min)\n
-        checkReferenceUniqueness(reference, model)\n
         check = item.newContent(portal_type=\'Check\', title=str(reference), activate_kw={\'tag\': \'check_%s_%s\' % (model, reference)})\n
         check.setDestination(destination_section)\n
         check.setStartDate(start_date)\n
@@ -321,6 +322,7 @@ for line in line_list:\n
                             <string>reference_range_max</string>
                             <string>start_date</string>
                             <string>destination_section</string>
+                            <string>reference_list</string>
                             <string>j</string>
                             <string>reference</string>
                             <string>str</string>
diff --git a/bt5/erp5_banking_check/bt/revision b/bt5/erp5_banking_check/bt/revision
index 3fdc173dab..a09fd8ad47 100644
--- a/bt5/erp5_banking_check/bt/revision
+++ b/bt5/erp5_banking_check/bt/revision
@@ -1 +1 @@
-122
\ No newline at end of file
+124
\ No newline at end of file
diff --git a/bt5/erp5_banking_check/bt/template_portal_type_allowed_content_type_list b/bt5/erp5_banking_check/bt/template_portal_type_allowed_content_type_list
index 04ebfbfb0a..a744e91c14 100644
--- a/bt5/erp5_banking_check/bt/template_portal_type_allowed_content_type_list
+++ b/bt5/erp5_banking_check/bt/template_portal_type_allowed_content_type_list
@@ -14,6 +14,7 @@ Checkbook Vault Transfer | Checkbook Delivery Line
 Stop Payment Module | Stop Payment
 Stop Payment | Checkbook Delivery Line
 Traveler Check Purchase Module | Traveler Check Purchase
+Traveler Check Purchase | Banking Operation Line
 Traveler Check Purchase | Checkbook Delivery Line
 Traveler Check Sale Module | Traveler Check Sale
 Traveler Check Sale | Banking Operation Line
-- 
2.30.9