[Erp5-report] r19734 - in /erp5/trunk/bt5/erp5_payroll: SkinTemplateItem/portal_skins/erp5_...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 6 16:23:18 CET 2008


Author: jerome
Date: Thu Mar  6 16:23:18 2008
New Revision: 19734

URL: http://svn.erp5.org?rev=19734&view=rev
Log:
2008-03-06 jerome
* API change: PaySheetTransaction_getMovementList was returning the total price as "xxx_quantity" on brains. It now returns quantity, price and total_price respectivly.

Added:
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox_employee_share_total_price.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox_employer_share_total_price.xml
Modified:
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getListBoxColumnList.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml
    erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox.xml
    erp5/trunk/bt5/erp5_payroll/bt/change_log
    erp5/trunk/bt5/erp5_payroll/bt/revision

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getListBoxColumnList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getListBoxColumnList.xml?rev=19734&r1=19733&r2=19734&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getListBoxColumnList.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getListBoxColumnList.xml Thu Mar  6 16:23:18 2008
@@ -92,7 +92,7 @@
 for model_line in context.contentValues(portal_type=\'Pay Sheet Line\'):\n
   for tax_category in model_line.getTaxCategoryValueList():\n
     price = (tax_category.getId()+\'_price\', tax_category.getTitle()+\' Rate\')\n
-    quantity = (tax_category.getId()+\'_quantity\', \n
+    quantity = (tax_category.getId()+\'_total_price\', \n
                 tax_category.getTitle()+\' Amount\')\n
     if price not in column_list:\n
       column_list.append(price)\n

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml?rev=19734&r1=19733&r2=19734&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml Thu Mar  6 16:23:18 2008
@@ -93,8 +93,11 @@
   base_application_list = paysheet_line.getBaseAmountTitleList()\n
   translated_base_application_list = [str(N_(x)) for x in base_application_list]\n
   base_application_list = \', \'.join(translated_base_application_list)\n
-  payroll_service = paysheet_line.getResourceValue()\n
-  base_participation_list = payroll_service.getBaseAmountList()\n
+  payroll_service = paysheet_line.getResourceValue(portal_type=\'Payroll Service\')\n
+  if payroll_service is not None:\n
+    base_participation_list = payroll_service.getBaseAmountList()\n
+  else:\n
+    base_participation_list = []\n
   causality = paysheet_line.getCausality()\n
 \n
   base_list = [str(N_(base_application)) for base_application in \\\n
@@ -112,6 +115,10 @@
   indice = 0\n
 \n
   object_dict = {}\n
+  if cartesian_product == [[]] or cartesian_product == []:\n
+    line_list.append(paysheet_line)\n
+    continue\n
+\n
   for tuple in cartesian_product:\n
     indice += 1\n
     share_dict = {}\n
@@ -122,10 +129,10 @@
     quantity = cell.getQuantity()\n
     base = quantity\n
 \n
-    price = cell.getPrice()\n
-    share_dict[cell.getTaxCategory()+\'_price\'] = price\n
-    share_dict[cell.getTaxCategory()+\'_quantity\'] = round(quantity*price,\n
-        precision)\n
+    share_dict[cell.getTaxCategory()+\'_price\'] = cell.getPrice()\n
+    share_dict[cell.getTaxCategory()+\'_quantity\'] = cell.getQuantity()\n
+    share_dict[cell.getTaxCategory()+\'_total_price\'] = \\\n
+                    round(cell.getTotalPrice(), precision)\n
 \n
     tuple_dict = {}\n
     for item in tuple:\n
@@ -163,10 +170,8 @@
     line_list.append(paysheet_line.asContext(**object_dict[\'no_slice\']))\n
 \n
 \n
-#return printed\n
 \n
 # sort results\n
-\n
 def sortByTitleAscending(x, y):\n
   return cmp(x.getTitle(), y.getTitle())\n
 \n
@@ -264,6 +269,7 @@
                             <string>str</string>
                             <string>translated_base_application_list</string>
                             <string>payroll_service</string>
+                            <string>None</string>
                             <string>base_participation_list</string>
                             <string>causality</string>
                             <string>base_application</string>
@@ -273,7 +279,6 @@
                             <string>base_category</string>
                             <string>list</string>
                             <string>cartesian_product</string>
-                            <string>None</string>
                             <string>previous_share</string>
                             <string>indice</string>
                             <string>object_dict</string>
@@ -284,7 +289,6 @@
                             <string>cell</string>
                             <string>quantity</string>
                             <string>base</string>
-                            <string>price</string>
                             <string>_write_</string>
                             <string>round</string>
                             <string>tuple_dict</string>

Modified: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox.xml?rev=19734&r1=19733&r2=19734&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox.xml (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox.xml Thu Mar  6 16:23:18 2008
@@ -63,17 +63,17 @@
             <value>
               <dictionary>
                 <item>
-                    <key>                 <string>all_columns</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key>                 <string>columns</string> </key>
+                    <key> <string>all_columns</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>columns</string> </key>
                     <value>
                       <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
                     </value>
                 </item>
                 <item>
-                    <key>                 <string>editable_columns</string> </key>
+                    <key> <string>editable_columns</string> </key>
                     <value>
                       <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
                     </value>
@@ -87,19 +87,19 @@
                     <value> <string></string> </value>
                 </item>
                 <item>
-                    <key>                 <string>list_method</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key>                 <string>portal_types</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key>                 <string>selection_name</string> </key>
-                    <value> <string></string> </value>
-                </item>
-                <item>
-                    <key>                 <string>sort</string> </key>
+                    <key> <string>list_method</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>portal_types</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>selection_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>sort</string> </key>
                     <value> <string></string> </value>
                 </item>
                 <item>
@@ -107,7 +107,7 @@
                     <value> <string></string> </value>
                 </item>
                 <item>
-                    <key>                 <string>title</string> </key>
+                    <key> <string>title</string> </key>
                     <value> <string></string> </value>
                 </item>
               </dictionary>

Added: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox_employee_share_total_price.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox_employee_share_total_price.xml?rev=19734&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox_employee_share_total_price.xml (added)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox_employee_share_total_price.xml Thu Mar  6 16:23:18 2008
@@ -1,0 +1,99 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>delegated_list</string> </key>
+            <value>
+              <list>
+                <string>editable</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>listbox_employee_share_total_price</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string>my_money_quantity</string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string>Base_viewFieldLibrary</string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string>Click to edit the target</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox_employer_share_total_price.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox_employer_share_total_price.xml?rev=19734&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox_employer_share_total_price.xml (added)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_view/listbox_employer_share_total_price.xml Thu Mar  6 16:23:18 2008
@@ -1,0 +1,99 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>delegated_list</string> </key>
+            <value>
+              <list>
+                <string>editable</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>listbox_employer_share_total_price</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string>my_money_quantity</string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string>Base_viewFieldLibrary</string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string>Click to edit the target</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_payroll/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/bt/change_log?rev=19734&r1=19733&r2=19734&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_payroll/bt/change_log Thu Mar  6 16:23:18 2008
@@ -1,3 +1,6 @@
+2008-03-06 jerome
+* API change: PaySheetTransaction_getMovementList was returning the total price as "xxx_quantity" on brains. It now returns quantity, price and total_price respectivly.
+
 2008-02-14 fabien
 * correct some script : context was used instead paysheet, so results were wrong
 

Modified: erp5/trunk/bt5/erp5_payroll/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/bt/revision?rev=19734&r1=19733&r2=19734&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/bt/revision (original)
+++ erp5/trunk/bt5/erp5_payroll/bt/revision Thu Mar  6 16:23:18 2008
@@ -1,1 +1,1 @@
-212
+218




More information about the Erp5-report mailing list