[Erp5-report] r31928 luke - in /erp5/trunk/bt5/erp5_payroll: SkinTemplateItem/portal_skins/...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jan 25 11:16:43 CET 2010
Author: luke
Date: Mon Jan 25 11:16:41 2010
New Revision: 31928
URL: http://svn.erp5.org?rev=31928&view=rev
Log:
- microoptimisation and make script more issue resistant
Sometimes cell.getContributionShare can return None. This script fails,
as it is not possible to add None with script. Thanks to this change
script will not fail in (possibly) wrongly configured environment.
Modified:
erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml
erp5/trunk/bt5/erp5_payroll/bt/revision
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=31928&r1=31927&r2=31928&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_getMovementList.xml [utf8] Mon Jan 25 11:16:41 2010
@@ -119,9 +119,10 @@
\n
base = cell.getQuantity()\n
\n
- share_dict[cell.getContributionShare()+\'_price\'] = cell.getPrice()\n
- share_dict[cell.getContributionShare()+\'_quantity\'] = cell.getQuantity()\n
- share_dict[cell.getContributionShare()+\'_total_price\'] = \\\n
+ cell_contribution_share = cell.getContributionShare() or \'\'\n
+ share_dict[cell_contribution_share+\'_price\'] = cell.getPrice()\n
+ share_dict[cell_contribution_share+\'_quantity\'] = cell.getQuantity()\n
+ share_dict[cell_contribution_share+\'_total_price\'] = \\\n
round(cell.getTotalPrice(), precision)\n
\n
tuple_dict = {}\n
@@ -294,6 +295,7 @@
<string>share_dict</string>
<string>cell</string>
<string>base</string>
+ <string>cell_contribution_share</string>
<string>_write_</string>
<string>round</string>
<string>tuple_dict</string>
Modified: erp5/trunk/bt5/erp5_payroll/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_payroll/bt/revision?rev=31928&r1=31927&r2=31928&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_payroll/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_payroll/bt/revision [utf8] Mon Jan 25 11:16:41 2010
@@ -1,1 +1,1 @@
-540
+541
More information about the Erp5-report
mailing list