[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
This commit is contained in:
Manuel Vázquez Acosta 2015-10-31 08:10:38 -04:00 committed by Martin Trigaux
parent 7cab554590
commit c333385eda
1 changed files with 1 additions and 1 deletions

View File

@ -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,