[IMP] test move lines
authornel@tinyerp.com <>
Mon, 4 Apr 2011 10:08:39 +0000 (12:08 +0200)
committernel@tinyerp.com <>
Mon, 4 Apr 2011 10:08:39 +0000 (12:08 +0200)
bzr revid: nel@tinyerp.com-20110404100839-f0cn5y0r4s6leeji

addons/account/account_assert_test.xml

index 8802551..0c0158a 100644 (file)
@@ -2,7 +2,7 @@
 <openerp>
     <data>
         <assert model="account.move" search="[]" string="For all Journal Items, the state is valid implies that the sum of credits equals the sum of debits">
-            <test expr="not len(line_id) or line_id[0].state != 'valid' or (sum([l.debit - l.credit for l in line_id]) &lt;= 0.00001)"/>
+            <test expr="not len(line_id) or line_id[0].state != 'valid' or abs(sum([l.debit - l.credit for l in line_id]) &lt;= 0.00001)"/>
         </assert>
     </data>
 </openerp>