[Erp5-report] r31818 jerome - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_s...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jan 19 12:06:05 CET 2010


Author: jerome
Date: Tue Jan 19 12:06:05 2010
New Revision: 31818

URL: http://svn.erp5.org?rev=31818&view=rev
Log:
This assert was wrong, for example when a transaction contained multiple lines grouped together

Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_resetGroupingReference.xml
    erp5/trunk/bt5/erp5_accounting/bt/revision

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_resetGroupingReference.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_resetGroupingReference.xml?rev=31818&r1=31817&r2=31818&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_resetGroupingReference.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_resetGroupingReference.xml [utf8] Tue Jan 19 12:06:05 2010
@@ -60,10 +60,14 @@
 of all accounting lines in the group is 0.\n
 Returns the list of ungroupped lines.\n
 """\n
+\n
+if not context.getGroupingReference():\n
+  # The line grouping reference can alredy have been removed, for example when two\n
+  # lines of the same transaction have the same grouping reference.\n
+  return []\n
+\n
 portal = context.getPortalObject()\n
 precision = context.getResourceValue(portal_type=\'Currency\').getQuantityPrecision()\n
-\n
-assert context.getGroupingReference()\n
 \n
 if context.AccountingTransaction_isSourceView():\n
   node_uid = context.getSourceUid()\n
@@ -137,7 +141,6 @@
                             <string>context</string>
                             <string>portal</string>
                             <string>precision</string>
-                            <string>AssertionError</string>
                             <string>node_uid</string>
                             <string>None</string>
                             <string>section_category</string>

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=31818&r1=31817&r2=31818&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Tue Jan 19 12:06:05 2010
@@ -1,1 +1,1 @@
-1086
+1087




More information about the Erp5-report mailing list