Fix install with other currency than EUR
- Add date to rate currency - Fix unit test to check correctly " == 0" bzr revid: ced-1ea6ce8e17779b8a0edf8257d5823e1e683a75b7
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<terp>
|
||||
<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">
|
||||
<test expr="not len(line_id) or line_id[0].state != 'valid' or (sum([l.debit - l.credit for l in line_id]) == 0)" />
|
||||
<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)" />
|
||||
</assert>
|
||||
|
||||
<!--assert model="account.invoice" search="[]" string="If the invoice is paid, third party accounting lines must be reconciled">
|
||||
@@ -10,7 +10,7 @@
|
||||
</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])" />
|
||||
<test expr="not len(child_id) or (balance - sum([c.balance for c in child_id]) <= 0.00001)" />
|
||||
</assert>
|
||||
|
||||
<assert model="account.move.line" search="[('account_id.type', '=', 'view')]" string="Accounts of view type do not contain any move line">
|
||||
@@ -18,15 +18,15 @@
|
||||
</assert>
|
||||
|
||||
<assert model="account.invoice" search="[('state', 'in', ['paid', 'open'])]" string="The total amount of all paid or open invoices si correctly computed">
|
||||
<test expr="sum([l.price_subtotal for l in invoice_line]) == amount_untaxed" />
|
||||
<test expr="sum([l.price_subtotal for l in invoice_line]) - amount_untaxed <= 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]) == 0" />
|
||||
<test expr="sum([l.debit - l.credit for l in line_id]) <= 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]" />
|
||||
</assert>
|
||||
</data>
|
||||
</terp>
|
||||
</terp>
|
||||
|
||||
@@ -66,13 +66,13 @@
|
||||
<value eval="ref('cash')" />
|
||||
<value eval="ref('account.period_' + str(int(time.strftime('%m'))))" />
|
||||
<value eval="ref('bank_journal')" />
|
||||
<value eval="False" />
|
||||
<value eval="ref('cash')" />
|
||||
<value eval="ref('account.period_' + str(int(time.strftime('%m'))))" />
|
||||
<value eval="False" />
|
||||
<value eval="ref('bank_journal')" />
|
||||
</function>
|
||||
|
||||
<assert model="account.invoice" id="test_invoice_1" string="Test invoice 1 is now paid">
|
||||
<test expr="state">paid</test>
|
||||
</assert>
|
||||
</data>
|
||||
</terp>
|
||||
</terp>
|
||||
|
||||
Reference in New Issue
Block a user