odoo/addons/account/account_assert_test.xml

9 lines
396 B
XML

<?xml version="1.0" encoding="utf-8"?>
<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)"/>
</assert>
</data>
</openerp>