From d96e0444227e2916963482deff06c880147802e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com>
Date: Mon, 6 Nov 2006 13:24:46 +0000
Subject: [PATCH] xml changes + script fix

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11118 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../ModuleTemplateItem/check_payment_module.xml     |  3 +++
 .../checkbook_delivery_module.xml                   |  3 +++
 .../checkbook_movement_module.xml                   |  3 +++
 .../checkbook_reception_module.xml                  |  3 +++
 .../checkbook_usual_cash_transfer_module.xml        |  3 +++
 .../checkbook_vault_transfer_module.xml             |  3 +++
 .../ModuleTemplateItem/stop_payment_module.xml      |  3 +++
 .../traveler_check_purchase_module.xml              |  3 +++
 .../traveler_check_sale_module.xml                  |  3 +++
 .../CheckDetail_saveFastInputLine.xml               | 13 +++++++++----
 .../listbox.xml                                     |  2 +-
 .../scripts/validateConsistency.xml                 |  2 ++
 .../scripts/CheckbookReception_generateItemList.xml |  2 +-
 .../stop_payment_workflow/states/cancelled.xml      |  8 +++++++-
 bt5/erp5_banking_check/bt/revision                  |  2 +-
 15 files changed, 48 insertions(+), 8 deletions(-)

diff --git a/bt5/erp5_banking_check/ModuleTemplateItem/check_payment_module.xml b/bt5/erp5_banking_check/ModuleTemplateItem/check_payment_module.xml
index 5b56b2cbf4..258dff3a90 100644
--- a/bt5/erp5_banking_check/ModuleTemplateItem/check_payment_module.xml
+++ b/bt5/erp5_banking_check/ModuleTemplateItem/check_payment_module.xml
@@ -542,6 +542,9 @@
    <name>Manage Groups</name>
    <role>Manager</role>
   </permission>
+  <permission type='list'>
+   <name>Manage Selenium test cases</name>
+  </permission>
   <permission type='tuple'>
    <name>Manage Transient Object Container</name>
    <role>Manager</role>
diff --git a/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_delivery_module.xml b/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_delivery_module.xml
index 2a44d38c4f..34b9b6de1b 100644
--- a/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_delivery_module.xml
+++ b/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_delivery_module.xml
@@ -527,6 +527,9 @@
   <permission type='tuple'>
    <name>Manage Groups</name>
   </permission>
+  <permission type='list'>
+   <name>Manage Selenium test cases</name>
+  </permission>
   <permission type='tuple'>
    <name>Manage Transient Object Container</name>
    <role>Manager</role>
diff --git a/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_movement_module.xml b/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_movement_module.xml
index 19a0c35af3..ab8f493859 100644
--- a/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_movement_module.xml
+++ b/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_movement_module.xml
@@ -543,6 +543,9 @@
    <name>Manage Groups</name>
    <role>Manager</role>
   </permission>
+  <permission type='list'>
+   <name>Manage Selenium test cases</name>
+  </permission>
   <permission type='tuple'>
    <name>Manage Transient Object Container</name>
    <role>Manager</role>
diff --git a/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_reception_module.xml b/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_reception_module.xml
index d8e21a5a88..d0c33ea1ae 100644
--- a/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_reception_module.xml
+++ b/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_reception_module.xml
@@ -542,6 +542,9 @@
    <name>Manage Groups</name>
    <role>Manager</role>
   </permission>
+  <permission type='list'>
+   <name>Manage Selenium test cases</name>
+  </permission>
   <permission type='tuple'>
    <name>Manage Transient Object Container</name>
    <role>Manager</role>
diff --git a/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_usual_cash_transfer_module.xml b/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_usual_cash_transfer_module.xml
index 14f6b95c5b..a8198170ea 100644
--- a/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_usual_cash_transfer_module.xml
+++ b/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_usual_cash_transfer_module.xml
@@ -543,6 +543,9 @@
    <name>Manage Groups</name>
    <role>Manager</role>
   </permission>
+  <permission type='list'>
+   <name>Manage Selenium test cases</name>
+  </permission>
   <permission type='tuple'>
    <name>Manage Transient Object Container</name>
    <role>Manager</role>
diff --git a/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_vault_transfer_module.xml b/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_vault_transfer_module.xml
index 9f2ffdeb5d..a92a267357 100644
--- a/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_vault_transfer_module.xml
+++ b/bt5/erp5_banking_check/ModuleTemplateItem/checkbook_vault_transfer_module.xml
@@ -543,6 +543,9 @@
    <name>Manage Groups</name>
    <role>Manager</role>
   </permission>
+  <permission type='list'>
+   <name>Manage Selenium test cases</name>
+  </permission>
   <permission type='tuple'>
    <name>Manage Transient Object Container</name>
    <role>Manager</role>
diff --git a/bt5/erp5_banking_check/ModuleTemplateItem/stop_payment_module.xml b/bt5/erp5_banking_check/ModuleTemplateItem/stop_payment_module.xml
index 7995f6d6b6..9f9efddefb 100644
--- a/bt5/erp5_banking_check/ModuleTemplateItem/stop_payment_module.xml
+++ b/bt5/erp5_banking_check/ModuleTemplateItem/stop_payment_module.xml
@@ -546,6 +546,9 @@
    <name>Manage Groups</name>
    <role>Manager</role>
   </permission>
+  <permission type='list'>
+   <name>Manage Selenium test cases</name>
+  </permission>
   <permission type='tuple'>
    <name>Manage Transient Object Container</name>
    <role>Manager</role>
diff --git a/bt5/erp5_banking_check/ModuleTemplateItem/traveler_check_purchase_module.xml b/bt5/erp5_banking_check/ModuleTemplateItem/traveler_check_purchase_module.xml
index 0c017bfd2c..467b33f77c 100644
--- a/bt5/erp5_banking_check/ModuleTemplateItem/traveler_check_purchase_module.xml
+++ b/bt5/erp5_banking_check/ModuleTemplateItem/traveler_check_purchase_module.xml
@@ -391,6 +391,9 @@
   <permission type='list'>
    <name>Manage Groups</name>
   </permission>
+  <permission type='list'>
+   <name>Manage Selenium test cases</name>
+  </permission>
   <permission type='list'>
    <name>Manage Transient Object Container</name>
   </permission>
diff --git a/bt5/erp5_banking_check/ModuleTemplateItem/traveler_check_sale_module.xml b/bt5/erp5_banking_check/ModuleTemplateItem/traveler_check_sale_module.xml
index 147694de3c..44bdc72ea0 100644
--- a/bt5/erp5_banking_check/ModuleTemplateItem/traveler_check_sale_module.xml
+++ b/bt5/erp5_banking_check/ModuleTemplateItem/traveler_check_sale_module.xml
@@ -546,6 +546,9 @@
    <name>Manage Groups</name>
    <role>Manager</role>
   </permission>
+  <permission type='list'>
+   <name>Manage Selenium test cases</name>
+  </permission>
   <permission type='tuple'>
    <name>Manage Transient Object Container</name>
    <role>Manager</role>
diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_saveFastInputLine.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_saveFastInputLine.xml
index 298cdaed33..e14bdd4209 100644
--- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_saveFastInputLine.xml
+++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/CheckDetail_saveFastInputLine.xml
@@ -72,6 +72,9 @@
 
 # get the list of movement we need to create\n
 \n
+portal = context.getPortalObject()\n
+N_ = portal.Base_translateString\n
+\n
 # First call the first scripts wich check many things\n
 error_value = context.CheckDelivery_generateCheckDetailInputDialog(\n
                                      listbox=listbox,batch_mode=1,**kw)\n
@@ -144,11 +147,11 @@ for line in listbox:\n
 \n
 \n
 request  = context.REQUEST\n
-message = "No%%20Lines%%20Created"\n
+message = N_("No+Lines+Created.")\n
 if number_of_line_created>0:\n
-  message = "Lines%%20Created"\n
+  message = N_("Lines+Created.")\n
 redirect_url = \'%s/view?%s\' % ( context.absolute_url()\n
-                                , \'portal_status_message=%s%%20Created\' % message\n
+                                , \'portal_status_message=%s\' % message\n
                                 )\n
 request[ \'RESPONSE\' ].redirect( redirect_url )\n
 
@@ -217,9 +220,11 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
                           <tuple>
                             <string>listbox</string>
                             <string>kw</string>
-                            <string>_apply_</string>
                             <string>_getattr_</string>
                             <string>context</string>
+                            <string>portal</string>
+                            <string>N_</string>
+                            <string>_apply_</string>
                             <string>error_value</string>
                             <string>request</string>
                             <string>None</string>
diff --git a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/StopPaymentModule_viewStopPaymentList/listbox.xml b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/StopPaymentModule_viewStopPaymentList/listbox.xml
index 0d3d47410e..5a804f3e99 100644
--- a/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/StopPaymentModule_viewStopPaymentList/listbox.xml
+++ b/bt5/erp5_banking_check/SkinTemplateItem/portal_skins/erp5_banking_check_operation/StopPaymentModule_viewStopPaymentList/listbox.xml
@@ -452,7 +452,7 @@
                 </item>
                 <item>
                     <key> <string>list_action</string> </key>
-                    <value> <string>StopPaymentModule_viewStopPaymentDeliveryList</string> </value>
+                    <value> <string>StopPaymentModule_viewStopPaymentList</string> </value>
                 </item>
                 <item>
                     <key> <string>list_method</string> </key>
diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml
index a211f1ff98..ce345878ab 100644
--- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml
+++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/check_payment_workflow/scripts/validateConsistency.xml
@@ -153,6 +153,8 @@ elif len(result) == 1:\n
       msg = Message(domain=\'ui\', message=\'The check has been stopped.\')\n
     elif state == \'delivered\':\n
       msg = Message(domain=\'ui\', message=\'The check has already been cashed.\')\n
+    elif state == \'stopped\':\n
+      msg = Message(domain=\'ui\', message=\'The check is stopped.\')\n
     raise ValidationFailed, (msg,)\n
 else:\n
   msg = Message(domain=\'ui\', message=\'Duplicate checks for the same check number\')\n
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 a7e0f8dfae..06b23c2e1d 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
@@ -114,7 +114,7 @@ for line in line_list:\n
         reference_range_max = str(int(float(reference_range_min)) + int(check_quantity)-1)\n
         item.setReferenceRangeMax(reference_range_max)\n
         item.setTitle(\'%s - %s\' % (reference_range_min, reference_range_max))\n
-        reference_range_min = reference_range_max\n
+        reference_range_min = str(int(reference_range_max) + 1)\n
         item.setCheckAmount(check_amount)\n
       else:\n
         item.setReference(reference_range_min)\n
diff --git a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml
index 6ccbf62916..aad6a199c9 100644
--- a/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml
+++ b/bt5/erp5_banking_check/WorkflowTemplateItem/portal_workflow/stop_payment_workflow/states/cancelled.xml
@@ -34,7 +34,7 @@
         </item>
         <item>
             <key> <string>title</string> </key>
-            <value> <string>Canceled</string> </value>
+            <value> <string>Cancelled</string> </value>
         </item>
         <item>
             <key> <string>transitions</string> </key>
@@ -42,6 +42,12 @@
               <tuple/>
             </value>
         </item>
+        <item>
+            <key> <string>type_list</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
       </dictionary>
     </pickle>
   </record>
diff --git a/bt5/erp5_banking_check/bt/revision b/bt5/erp5_banking_check/bt/revision
index 1758dddcce..72f523f36e 100644
--- a/bt5/erp5_banking_check/bt/revision
+++ b/bt5/erp5_banking_check/bt/revision
@@ -1 +1 @@
-32
\ No newline at end of file
+39
\ No newline at end of file
-- 
2.30.9