From 4a3b8f91e63a914eadddd5dcee491d577d9b0bfb Mon Sep 17 00:00:00 2001 From: "Bharat (OpenERP)" Date: Tue, 2 Aug 2011 12:57:04 +0530 Subject: [PATCH] [IMP] Improved the context={'date':inv.date_invoice} by using context.copy and then passed the variable in context bzr revid: bde@tinyerp.com-20110802072704-7kpgux06o9fw1jft --- addons/account/invoice.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 873b8852f19..cab9e481d8d 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -861,9 +861,11 @@ class account_invoice(osv.osv): res_amount_currency = total_currency i = 0 for t in totlines: + ctx = context.copy() + ctx = {'date':inv.date_invoice} if inv.currency_id.id != company_currency: amount_currency = cur_obj.compute(cr, uid, - company_currency, inv.currency_id.id, t[1], context={'date':inv.date_invoice}) + company_currency, inv.currency_id.id, t[1]) else: amount_currency = False