[Erp5-report] r25468 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Feb 6 05:10:36 CET 2009


Author: yo
Date: Fri Feb  6 05:10:35 2009
New Revision: 25468

URL: http://svn.erp5.org?rev=25468&view=rev
Log:
2009-02-06 yo
* Stop raising an exception, even if the credit is not equal to the debit in a built delivery, in the post processing script, because the builder may not blindly adopt prevision when updating existing lines, thus it can be unbalanced.

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

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_roundDebitCredit.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_roundDebitCredit.xml?rev=25468&r1=25467&r2=25468&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_roundDebitCredit.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_roundDebitCredit.xml [utf8] Fri Feb  6 05:10:35 2009
@@ -72,12 +72,15 @@
   line.setQuantity(line_quantity)\n
   total_quantity += line_quantity\n
 \n
-# total_quantity should be 0, or we created a transaction where debit != credit\n
+# The total quantity should be zero with a little error, if simulation has been\n
+# completely applied, because the debit and the credit must be balanced. However,\n
+# this is not the case, if the delivery is divergent, as the builder does not\n
+# adopt prevision automatically, when a conflict happens between the simulation\n
+# and user-entered values.\n
 if abs(round(total_quantity, precision)) > 2 * resource.getBaseUnitQuantity():\n
-  raise ValueError, \'debit != credit for %s => %s\' % (\n
-        context.getPath(), total_quantity)\n
+  return\n
 \n
-# if the difference is <= the base quantity unit, we round the last line\n
+# if the difference is <= the base quantity unit, we round the last line.\n
 if line is not None:\n
   line.setQuantity(round(line.getQuantity() - total_quantity, precision))\n
 
@@ -131,7 +134,6 @@
                             <string>line_quantity</string>
                             <string>_inplacevar_</string>
                             <string>abs</string>
-                            <string>ValueError</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_accounting/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/change_log?rev=25468&r1=25467&r2=25468&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/change_log [utf8] Fri Feb  6 05:10:35 2009
@@ -1,3 +1,6 @@
+2009-02-06 yo
+* Stop raising an exception, even if the credit is not equal to the debit in a built delivery, in the post processing script, because the builder may not blindly adopt prevision when updating existing lines, thus it can be unbalanced.
+
 2008-11-13 yusei
 * Start to develop version 5.4.
 

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=25468&r1=25467&r2=25468&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Fri Feb  6 05:10:35 2009
@@ -1,1 +1,1 @@
-859
+861




More information about the Erp5-report mailing list