From d31cb18212e869643ca3e340a9e9b04ed5f40eaf Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Fri, 13 Jun 2008 17:35:23 +0200 Subject: [PATCH] Change to reflect new condition on move line: amount second currency is now always positive. --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index f92b0dc341..e4eaf98b88 100644 --- a/invoice.py +++ b/invoice.py @@ -630,6 +630,7 @@ class Invoice(OSV): res['amount_second_currency'] = currency_obj.compute(cursor, user, invoice.company.currency, amount, invoice.currency, context=context) + res['amount_second_currency'] = abs(res['amount_second_currency']) res['second_currency'] = invoice.currency.id else: res['amount_second_currency'] = Decimal('0.0') @@ -637,7 +638,6 @@ class Invoice(OSV): if amount >= Decimal('0.0'): res['debit'] = Decimal('0.0') res['credit'] = amount - res['amount_second_currency'] = - res['amount_second_currency'] else: res['debit'] = - amount res['credit'] = Decimal('0.0')