From e4dd2f9f2c2faa4440d7e983336407193884a954 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Tue, 8 Apr 2008 13:19:21 +0000
Subject: [PATCH] Only make my_translated_immobilisation_state_title visible if
 there is a workflow providing an immobilisation state.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20352 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 ..._translated_immobilisation_state_title.xml | 37 ++++++++++++++++++-
 bt5/erp5_trade/bt/revision                    |  2 +-
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PurchasePackingList_viewFieldLibrary/my_translated_immobilisation_state_title.xml b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PurchasePackingList_viewFieldLibrary/my_translated_immobilisation_state_title.xml
index 6afc414e64..dc4c64354c 100644
--- a/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PurchasePackingList_viewFieldLibrary/my_translated_immobilisation_state_title.xml
+++ b/bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PurchasePackingList_viewFieldLibrary/my_translated_immobilisation_state_title.xml
@@ -20,6 +20,7 @@
             <value>
               <list>
                 <string>title</string>
+                <string>enabled</string>
               </list>
             </value>
         </item>
@@ -61,6 +62,12 @@
             <key> <string>tales</string> </key>
             <value>
               <dictionary>
+                <item>
+                    <key>                 <string>enabled</string> </key>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
+                </item>
                 <item>
                     <key> <string>extra_context</string> </key>
                     <value> <string></string> </value>
@@ -73,6 +80,14 @@
                     <key> <string>form_id</string> </key>
                     <value> <string></string> </value>
                 </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key>                 <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
               </dictionary>
             </value>
         </item>
@@ -80,6 +95,10 @@
             <key> <string>values</string> </key>
             <value>
               <dictionary>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
                 <item>
                     <key> <string>extra_context</string> </key>
                     <value>
@@ -95,7 +114,7 @@
                     <value> <string>Base_viewFieldLibrary</string> </value>
                 </item>
                 <item>
-                    <key>                 <string>title</string> </key>
+                    <key> <string>title</string> </key>
                     <value> <string>Immobilisation State</string> </value>
                 </item>
               </dictionary>
@@ -104,4 +123,20 @@
       </dictionary>
     </pickle>
   </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>python: getattr(here, \'getImmobilisationState\', None) is not None</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
 </ZopeData>
diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision
index a817176f4a..0ddd619ce3 100644
--- a/bt5/erp5_trade/bt/revision
+++ b/bt5/erp5_trade/bt/revision
@@ -1 +1 @@
-216
+217
-- 
2.30.9