From 2cb708d98f822630664bb1a3a0a4b489d2aeaa83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 19 Jan 2013 17:11:54 +0100 Subject: [PATCH] Currency.compute takes only instance issue2953 review639002 (transplanted from 370c725d42fcc2dbaac36d6326c6b05cff99b197) --- invoice.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/invoice.py b/invoice.py index b0b934490b..c71e1ac480 100644 --- a/invoice.py +++ b/invoice.py @@ -784,7 +784,7 @@ class Invoice(Workflow, ModelSQL, ModelView): if self.currency.id != self.company.currency.id: with Transaction().set_context(date=self.currency_date): res['amount_second_currency'] = Currency.compute( - self.company.currency.id, amount, self.currency.id) + self.company.currency, amount, self.currency) res['amount_second_currency'] = abs(res['amount_second_currency']) res['second_currency'] = self.currency.id else: @@ -2311,8 +2311,8 @@ class PayInvoice(Wizard): default['company'] = invoice.company.id with Transaction().set_context(date=self.start.date): - amount = Currency.compute(self.start.currency.id, - self.start.amount, invoice.company.currency.id) + amount = Currency.compute(self.start.currency, + self.start.amount, invoice.company.currency) if invoice.company.currency.is_zero(amount): default['lines'] = [x.id for x in invoice.lines_to_pay]