From 03fcd6ee3ad6ef6162530dcba6a9c20337d25f30 Mon Sep 17 00:00:00 2001
From: Fabien Morin <fabien@nexedi.com>
Date: Mon, 22 Jun 2009 12:33:10 +0000
Subject: [PATCH] - add reference field in the PaySheetLine_view - add a line
 property_movement_group_on_cell on the builder to be able to copy the
 reference on cells - remove my_float_index since the calculation can be done
 without order

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27733 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_deliveries/pay_sheet_builder.xml   |  2 +-
 .../property_movement_group_on_cell.xml       | 50 +++++++++++++++++++
 .../erp5_payroll/PaySheetLine_view.xml        |  1 +
 .../PaySheetLine_view/my_int_index.xml        |  4 +-
 .../my_reference.xml}                         | 17 ++++---
 .../erp5_payroll/PaySheetModelLine_view.xml   |  3 +-
 .../PaySheetModelLine_view/my_int_index.xml   | 43 ++++++++++++++--
 bt5/erp5_payroll/bt/revision                  |  2 +-
 8 files changed, 106 insertions(+), 16 deletions(-)
 create mode 100644 bt5/erp5_payroll/PathTemplateItem/portal_deliveries/pay_sheet_builder/property_movement_group_on_cell.xml
 rename bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/{PaySheetModelLine_view/my_float_index.xml => PaySheetLine_view/my_reference.xml} (84%)

diff --git a/bt5/erp5_payroll/PathTemplateItem/portal_deliveries/pay_sheet_builder.xml b/bt5/erp5_payroll/PathTemplateItem/portal_deliveries/pay_sheet_builder.xml
index d70d0c4cc2..cdc6a463e1 100644
--- a/bt5/erp5_payroll/PathTemplateItem/portal_deliveries/pay_sheet_builder.xml
+++ b/bt5/erp5_payroll/PathTemplateItem/portal_deliveries/pay_sheet_builder.xml
@@ -138,7 +138,7 @@
         </item>
         <item>
             <key> <string>last_id</string> </key>
-            <value> <string>4</string> </value>
+            <value> <string>6</string> </value>
         </item>
         <item>
             <key> <string>portal_type</string> </key>
diff --git a/bt5/erp5_payroll/PathTemplateItem/portal_deliveries/pay_sheet_builder/property_movement_group_on_cell.xml b/bt5/erp5_payroll/PathTemplateItem/portal_deliveries/pay_sheet_builder/property_movement_group_on_cell.xml
new file mode 100644
index 0000000000..0f3d989cb2
--- /dev/null
+++ b/bt5/erp5_payroll/PathTemplateItem/portal_deliveries/pay_sheet_builder/property_movement_group_on_cell.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PropertyMovementGroup" module="Products.ERP5Type.Document.PropertyMovementGroup"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>categories</string> </key>
+            <value>
+              <tuple>
+                <string>divergence_scope/property</string>
+                <string>collect_order_group/cell</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>property_movement_group_on_cell</string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Property Movement Group</string> </value>
+        </item>
+        <item>
+            <key> <string>tested_property</string> </key>
+            <value>
+              <tuple>
+                <string>reference</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>property_movement_group_on_cell</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetLine_view.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetLine_view.xml
index 6faa9a18fe..3e1631ef28 100644
--- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetLine_view.xml
+++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetLine_view.xml
@@ -89,6 +89,7 @@
                     <value>
                       <list>
                         <string>my_title</string>
+                        <string>my_reference</string>
                         <string>my_resource_title</string>
                         <string>my_source_section_title</string>
                         <string>my_destination_section_title</string>
diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetLine_view/my_int_index.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetLine_view/my_int_index.xml
index 0119381d59..ec8f523550 100644
--- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetLine_view/my_int_index.xml
+++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetLine_view/my_int_index.xml
@@ -13,8 +13,8 @@
             <key> <string>delegated_list</string> </key>
             <value>
               <list>
-                <string>title</string>
                 <string>css_class</string>
+                <string>title</string>
               </list>
             </value>
         </item>
@@ -93,7 +93,7 @@
                 </item>
                 <item>
                     <key> <string>title</string> </key>
-                    <value> <string>PaySheet Order</string> </value>
+                    <value> <string>Payslip Order</string> </value>
                 </item>
               </dictionary>
             </value>
diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_view/my_float_index.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetLine_view/my_reference.xml
similarity index 84%
rename from bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_view/my_float_index.xml
rename to bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetLine_view/my_reference.xml
index 39c145734c..3d24508b2d 100644
--- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_view/my_float_index.xml
+++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetLine_view/my_reference.xml
@@ -13,14 +13,15 @@
             <key> <string>delegated_list</string> </key>
             <value>
               <list>
-                <string>description</string>
+                <string>display_width</string>
+                <string>editable</string>
                 <string>title</string>
               </list>
             </value>
         </item>
         <item>
             <key> <string>id</string> </key>
-            <value> <string>my_float_index</string> </value>
+            <value> <string>my_reference</string> </value>
         </item>
         <item>
             <key> <string>message_values</string> </key>
@@ -76,12 +77,16 @@
             <value>
               <dictionary>
                 <item>
-                    <key> <string>description</string> </key>
-                    <value> <string>Pay Sheet Lines will be displayed in this order when printing the Pay Sheet.</string> </value>
+                    <key> <string>display_width</string> </key>
+                    <value> <int>20</int> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <int>0</int> </value>
                 </item>
                 <item>
                     <key> <string>field_id</string> </key>
-                    <value> <string>my_integer_value</string> </value>
+                    <value> <string>my_string_field</string> </value>
                 </item>
                 <item>
                     <key> <string>form_id</string> </key>
@@ -93,7 +98,7 @@
                 </item>
                 <item>
                     <key> <string>title</string> </key>
-                    <value> <string>PaySheet Order</string> </value>
+                    <value> <string>Reference</string> </value>
                 </item>
               </dictionary>
             </value>
diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_view.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_view.xml
index 55ac352ffa..2fef5cfccf 100644
--- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_view.xml
+++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_view.xml
@@ -101,14 +101,13 @@
                     <value>
                       <list>
                         <string>my_title</string>
-                        <string>my_float_index</string>
-                        <string>my_int_index</string>
                         <string>my_reference</string>
                         <string>my_resource_title</string>
                         <string>my_calculation_script_id</string>
                         <string>my_price</string>
                         <string>my_quantity</string>
                         <string>my_trade_phase</string>
+                        <string>my_int_index</string>
                       </list>
                     </value>
                 </item>
diff --git a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_view/my_int_index.xml b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_view/my_int_index.xml
index c573232ffd..cb0339ed48 100644
--- a/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_view/my_int_index.xml
+++ b/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetModelLine_view/my_int_index.xml
@@ -13,7 +13,8 @@
             <key> <string>delegated_list</string> </key>
             <value>
               <list>
-                <string>description</string>
+                <string>css_class</string>
+                <string>display_width</string>
                 <string>title</string>
               </list>
             </value>
@@ -56,6 +57,16 @@
             <key> <string>tales</string> </key>
             <value>
               <dictionary>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
+                </item>
                 <item>
                     <key> <string>field_id</string> </key>
                     <value> <string></string> </value>
@@ -68,6 +79,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>
@@ -76,8 +91,12 @@
             <value>
               <dictionary>
                 <item>
-                    <key> <string>description</string> </key>
-                    <value> <string>Pay Sheet Lines calculation will be done following this ordering</string> </value>
+                    <key> <string>css_class</string> </key>
+                    <value> <string>figure</string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <int>5</int> </value>
                 </item>
                 <item>
                     <key> <string>field_id</string> </key>
@@ -93,7 +112,7 @@
                 </item>
                 <item>
                     <key> <string>title</string> </key>
-                    <value> <string>Calculation Order</string> </value>
+                    <value> <string>Payslip Order</string> </value>
                 </item>
               </dictionary>
             </value>
@@ -101,4 +120,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: preferences.getPreference(\'preferred_quantity_field_width\', 8)</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
 </ZopeData>
diff --git a/bt5/erp5_payroll/bt/revision b/bt5/erp5_payroll/bt/revision
index 2d3d9c27b6..8cb9d84396 100644
--- a/bt5/erp5_payroll/bt/revision
+++ b/bt5/erp5_payroll/bt/revision
@@ -1 +1 @@
-472
\ No newline at end of file
+475
\ No newline at end of file
-- 
2.30.9