2008-07-01 15:58:58 +00:00
<?xml version="1.0" encoding="utf-8"?>
2007-08-09 13:12:25 +00:00
<terp >
2008-06-29 08:26:07 +00:00
<data >
<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" >
2008-07-01 15:58:58 +00:00
<test expr= "not len(line_id) or line_id[0].state != 'valid' or (sum([l.debit - l.credit for l in line_id]) <= 0.00001)" />
2008-06-29 08:26:07 +00:00
</assert>
2008-07-25 10:04:06 +00:00
2008-06-29 08:26:07 +00:00
<assert model= "account.account" search= "[]" string= "For all accounts, the balance is equal to the sum of the balance of its childs" >
2008-07-01 15:58:58 +00:00
<test expr= "not len(child_id) or (balance - sum([c.balance for c in child_id]) <= 0.00001)" />
2008-06-29 08:26:07 +00:00
</assert>
2008-07-25 10:04:06 +00:00
2008-06-29 08:26:07 +00:00
<assert model= "account.move.line" search= "[('account_id.type', '=', 'view')]" string= "Accounts of view type do not contain any move line" >
2008-07-01 15:58:58 +00:00
<test expr= "False" />
2008-06-29 08:26:07 +00:00
</assert>
2008-07-25 10:04:06 +00:00
2008-06-29 08:26:07 +00:00
<assert model= "account.invoice" search= "[('state', 'in', ['paid', 'open'])]" string= "The total amount of all paid or open invoices is correctly computed" >
2008-07-01 15:58:58 +00:00
<test expr= "sum([l.price_subtotal for l in invoice_line]) - amount_untaxed <= 0.00001" />
2008-06-29 08:26:07 +00:00
</assert>
2008-07-25 10:04:06 +00:00
2008-06-29 08:26:07 +00:00
<assert model= "account.move.reconcile" search= "[]" string= "For each reconciliation, the sum of credits equals the sum of debits" >
2008-07-01 15:58:58 +00:00
<test expr= "sum([l.debit - l.credit for l in line_id]) <= 0.00001" />
2008-06-29 08:26:07 +00:00
</assert>
2008-07-25 10:04:06 +00:00
2008-06-29 08:26:07 +00:00
<assert model= "account.account" search= "[]" string= "Every account must have at least one parent account of type '0'" >
2008-07-25 10:04:06 +00:00
<test expr= "not parent_id or (code!='0')" />
2008-06-29 08:26:07 +00:00
</assert>
</data>
2008-09-07 23:24:39 +00:00
</terp>