From c333385eda842dbea92c72db6f967575b2c715ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=A1zquez=20Acosta?= Date: Sat, 31 Oct 2015 08:10:38 -0400 Subject: [PATCH] [FIX] account_voucher: amount currency on supplier payment In scenario described at #1490 (comment 152726416), amount_currency of a supplier payment has the incorrect sign Complete ede807d2955 Closes #9347 --- addons/account_voucher/account_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index ae34b391c1b..0914146e275 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -1294,7 +1294,7 @@ class account_voucher(osv.osv): 'move_id': move_id, 'partner_id': line.voucher_id.partner_id.id, 'currency_id': line.move_line_id.currency_id.id, - 'amount_currency': -1 * foreign_currency_diff, + 'amount_currency': (-1 if line.type == 'cr' else 1) * foreign_currency_diff, 'quantity': 1, 'credit': 0.0, 'debit': 0.0,