From a910e31b53fc58ac7e4efef60fef32f60171ed07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Thu, 9 Dec 2010 17:15:01 +0000
Subject: [PATCH] use cell.Movement_isQuantityEditable in editable TALES, and
 other minor proxyfication fixes

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41290 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../my_dialog_mode_listbox_quantity.xml       | 34 +++++++++++--------
 bt5/erp5_item/bt/revision                     |  2 +-
 2 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item_trade/Base_viewTradeFieldLibrary/my_dialog_mode_listbox_quantity.xml b/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item_trade/Base_viewTradeFieldLibrary/my_dialog_mode_listbox_quantity.xml
index db76c7ba17..ebc7fc10b6 100644
--- a/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item_trade/Base_viewTradeFieldLibrary/my_dialog_mode_listbox_quantity.xml
+++ b/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item_trade/Base_viewTradeFieldLibrary/my_dialog_mode_listbox_quantity.xml
@@ -11,11 +11,9 @@
             <value>
               <list>
                 <string>description</string>
-                <string>title</string>
-                <string>css_class</string>
+                <string>editable</string>
                 <string>external_validator</string>
-                <string>input_style</string>
-                <string>display_width</string>
+                <string>title</string>
               </list>
             </value>
         </item>
@@ -58,11 +56,19 @@
             <value>
               <dictionary>
                 <item>
-                    <key> <string>display_width</string> </key>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
                     <value>
                       <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
                     </value>
                 </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
                 <item>
                     <key> <string>field_id</string> </key>
                     <value> <string></string> </value>
@@ -75,6 +81,10 @@
                     <key> <string>target</string> </key>
                     <value> <string></string> </value>
                 </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
               </dictionary>
             </value>
         </item>
@@ -82,14 +92,14 @@
             <key> <string>values</string> </key>
             <value>
               <dictionary>
-                <item>
-                    <key> <string>css_class</string> </key>
-                    <value> <string>figure</string> </value>
-                </item>
                 <item>
                     <key> <string>description</string> </key>
                     <value> <string>Default Quantity of a resource in ERP5. It can be a product or it can be time quantity like hours or minutes for example. Quantity can be found in almost every business field of ERP5 and will always have this meaning, unless the term is different or precise, such as Priced Quantity for example.</string> </value>
                 </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
                 <item>
                     <key> <string>external_validator</string> </key>
                     <value>
@@ -104,10 +114,6 @@
                     <key> <string>form_id</string> </key>
                     <value> <string>Base_viewFieldLibrary</string> </value>
                 </item>
-                <item>
-                    <key> <string>input_style</string> </key>
-                    <value> <string>-1 234.5</string> </value>
-                </item>
                 <item>
                     <key> <string>target</string> </key>
                     <value> <string>Click to edit the target</string> </value>
@@ -130,7 +136,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: preferences.getPreference(\'preferred_quantity_field_width\', 5)</string> </value>
+            <value> <string>python: cell is not None and cell.Movement_isQuantityEditable()</string> </value>
         </item>
       </dictionary>
     </pickle>
diff --git a/bt5/erp5_item/bt/revision b/bt5/erp5_item/bt/revision
index 9ce0f492d8..b6e27607fb 100644
--- a/bt5/erp5_item/bt/revision
+++ b/bt5/erp5_item/bt/revision
@@ -1 +1 @@
-241
\ No newline at end of file
+242
\ No newline at end of file
-- 
2.30.9