From 3750db76b595c7d880580965769a0fe56a91923e Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 29 Sep 2010 15:11:19 +0530 Subject: [PATCH] [FIX] Account voucher: Amount reconciled field on bank statement line (Voucher amount already converted to currecny amount if its multicurrency) bzr revid: mra@mra-laptop-20100929094119-g6agj50f6ghhos8w --- addons/account_voucher/account_voucher.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 4230ec539fd..fc46d7ec39e 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -852,17 +852,18 @@ class account_bank_statement_line(osv.osv): def _amount_reconciled(self, cursor, user, ids, name, args, context=None): if not ids: return {} + res_currency_obj = self.pool.get('res.currency') res = {} company_currency_id = False - for line in self.browse(cursor, user, ids, context=context): - if not company_currency_id: - company_currency_id = line.company_id.id +# if not company_currency_id: +# company_currency_id = line.company_id.id if line.voucher_id: - res[line.id] = res_currency_obj.compute(cursor, user, - company_currency_id, line.statement_id.currency.id, - line.voucher_id.amount, context=context) + res[line.id] = line.voucher_id.amount# +# res_currency_obj.compute(cursor, user, +# company_currency_id, line.statement_id.currency.id, +# line.voucher_id.amount, context=context) else: res[line.id] = 0.0 return res