Modified Assertion test for parent_id(as we changed the type of parent_id from many2many to many2one)

bzr revid: jvo@tinyerp.com-20080725100406-91nclj13dg2jt1og
This commit is contained in:
Jay Vora 2008-07-25 15:34:06 +05:30
parent ac438d5a0b
commit fa1961fcc8
1 changed files with 7 additions and 8 deletions

View File

@ -4,30 +4,29 @@
<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">
<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>
<!--assert model="account.invoice" search="[]" string="If the invoice is paid, third party accounting lines must be reconciled">
<test expr="not state == 'paid' or ..." />
</assert-->
<assert model="account.account" search="[]" string="For all accounts, the balance is equal to the sum of the balance of its childs">
<test expr="not len(child_id) or (balance - sum([c.balance for c in child_id]) &lt;= 0.00001)"/>
</assert>
<assert model="account.move.line" search="[('account_id.type', '=', 'view')]" string="Accounts of view type do not contain any move line">
<test expr="False"/>
</assert>
<assert model="account.invoice" search="[('state', 'in', ['paid', 'open'])]" string="The total amount of all paid or open invoices is correctly computed">
<test expr="sum([l.price_subtotal for l in invoice_line]) - amount_untaxed &lt;= 0.00001"/>
</assert>
<assert model="account.move.reconcile" search="[]" string="For each reconciliation, the sum of credits equals the sum of debits">
<test expr="sum([l.debit - l.credit for l in line_id]) &lt;= 0.00001"/>
</assert>
<assert model="account.account" search="[]" string="Every account must have at least one parent account of type '0'">
<test expr="not parent_id or '0' in [p.code for p in parent_id]"/>
<test expr="not parent_id or (code!='0')"/>
</assert>
</data>
</terp>