a7ff8e236aeef5febb74d2849065834fc19927f5
[odoo/odoo.git] / addons / account / account_assert_test.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4         <assert model="account.move" search="[]" string="For all account moves, the state is valid implies that the sum of credits equals the sum of debits">
5             <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)"/>
6         </assert>
7
8
9    <!--     <assert model="account.account" search="[]" string="For all accounts, the balance is equal to the sum of the balance of its childs">
10         <assert model="account.account" search="[]" string="For all accounts, the balance is equal to the sum of the balance of its childs">
11             <test expr="not len(child_id) or (balance - sum([c.balance for c in child_id]) &lt;= 0.00001)"/>
12         </assert>
13
14         <assert model="account.move.line" search="[('account_id.type', '=', 'view')]" string="Accounts of view type do not contain any move line">
15             <test expr="False"/>
16         </assert>
17
18         <assert model="account.invoice" search="[('state', 'in', ['paid', 'open'])]" string="The total amount of all paid or open invoices is correctly computed">
19             <test expr="sum([l.price_subtotal for l in invoice_line]) - amount_untaxed &lt;= 0.00001"/>
20         </assert>
21
22         <assert model="account.move.reconcile" search="[]" string="For each reconciliation, the sum of credits equals the sum of debits">
23             <test expr="sum([l.debit - l.credit for l in line_id]) &lt;= 0.00001"/>
24         </assert>
25
26 -->
27     </data>
28 </openerp>