From 8e6eabe1e87a84f8295c8bf91d886c4fdb1b7d86 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com>
Date: Tue, 19 Aug 2008 12:02:29 +0000
Subject: [PATCH] allow movement from "serre" vault only for coins

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23034 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../CashMovementNewNotEmitted_view/my_source.xml      |  9 +++------
 ...mentNewNotEmitted_viewCashContainerInputDialog.xml | 11 ++++++++++-
 bt5/erp5_banking_cash/bt/revision                     |  2 +-
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_view/my_source.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_view/my_source.xml
index a2901b5f07..54ffd6b54c 100644
--- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_view/my_source.xml
+++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_view/my_source.xml
@@ -267,18 +267,15 @@
   <record id="2" aka="AAAAAAAAAAI=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.Formulator.TALESField</string>
-          <string>TALESMethod</string>
-        </tuple>
-        <none/>
+        <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python:here.Delivery_getVaultItemList(current_url=here.getSource(), vault_type=(\'site/caveau/serre/transit\',))</string> </value>
+            <value> <string>python:here.Delivery_getVaultItemList(current_url=here.getSource(), vault_type=(\'site/caveau/serre/transit\',\'site/caveau/serre\',), exclude_vault_type=(\'site/caveau/serre/retire\',))</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_viewCashContainerInputDialog.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_viewCashContainerInputDialog.xml
index 221adc08b0..b8c47b449f 100644
--- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_viewCashContainerInputDialog.xml
+++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashMovementNewNotEmitted_viewCashContainerInputDialog.xml
@@ -67,6 +67,7 @@
             <key> <string>_body</string> </key>
             <value> <string>from DateTime import DateTime\n
 \n
+\n
 container_portal_type_list = ["Monetary Reception",]\n
 base_price_dict = {}\n
 \n
@@ -80,7 +81,15 @@ if listbox is None:\n
                                   , \'portal_status_message=Please+select+a+source.\'\n
                                   )\n
     return request.RESPONSE.redirect( redirect_url )\n
-  \n
+\n
+  if \'serre/encaisse_des_billets_neufs_non_emis\' in node:\n
+    request = context.REQUEST\n
+    redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
+                                  , \'view\'\n
+                                  , \'portal_status_message=Transit+must+be+in+source.\'\n
+                                  )\n
+    return request.RESPONSE.redirect( redirect_url )\n
+\n
   reference_date = DateTime()\n
   container_list = []\n
   listbox = []\n
diff --git a/bt5/erp5_banking_cash/bt/revision b/bt5/erp5_banking_cash/bt/revision
index 53a274896e..e78e423d29 100644
--- a/bt5/erp5_banking_cash/bt/revision
+++ b/bt5/erp5_banking_cash/bt/revision
@@ -1 +1 @@
-626
\ No newline at end of file
+627
\ No newline at end of file
-- 
2.30.9