[FIX] account_voucher: fixed yaml tests in order to reflect the new behavior of computed writeoff amount (does not use abs() anymore)

bzr revid: qdp-launchpad@openerp.com-20120810143707-8vma2dld7mkolbh1
This commit is contained in:
Quentin (OpenERP) 2012-08-10 16:37:07 +02:00
parent 6391df3989
commit 600625f0ae
2 changed files with 7 additions and 7 deletions

View File

@ -173,12 +173,12 @@
self.pool.get('account.voucher.line').write(cr, uid, [line_id], {'amount': amount})
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is 10.0
I check that writeoff amount computed is -10.0
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment: Case 1 USD/USD'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == 10.0), "Writeoff amount is not 10.0"
assert (voucher_id.writeoff_amount == -10.0), "Writeoff amount is not -10.0"
-
I confirm the voucher
-
@ -266,12 +266,12 @@
self.pool.get('account.voucher.line').write(cr, uid, [line_id], {'amount': amount})
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is 5.0
I check that writeoff amount computed is -5.0
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment: Case 1'), ('partner_id', '=', ref('base.res_partner_seagate'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == 5.0), "Writeoff amount is not 5.0"
assert (voucher_id.writeoff_amount == -5.0), "Writeoff amount is not -5.0"
-
I confirm the voucher
-

View File

@ -107,11 +107,11 @@
self.pool.get('account.voucher.line').write(cr, uid, [line_id], {'amount': amount})
assert (voucher.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is 50.0
I check that writeoff amount computed is -50.0
-
!python {model: account.voucher}: |
voucher = self.browse(cr, uid, ref('account_voucher_eur_usd_case'))
assert (voucher.writeoff_amount == 50.0), "Writeoff amount is not 50.0"
assert (voucher.writeoff_amount == -50.0), "Writeoff amount is not -50.0"
-
I confirm the voucher
-
@ -167,4 +167,4 @@
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for Invoice"