diff --git a/addons/account_voucher/test/case1_usd_usd.yml b/addons/account_voucher/test/case1_usd_usd.yml index d8ac932a055..a30c85ffb71 100644 --- a/addons/account_voucher/test/case1_usd_usd.yml +++ b/addons/account_voucher/test/case1_usd_usd.yml @@ -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 - diff --git a/addons/account_voucher/test/case_eur_usd.yml b/addons/account_voucher/test/case_eur_usd.yml index 72f0d22aead..53db4ffaf80 100644 --- a/addons/account_voucher/test/case_eur_usd.yml +++ b/addons/account_voucher/test/case_eur_usd.yml @@ -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" - \ No newline at end of file +