From 055318610e20d68a96250cdfa9ddb8a13568931f Mon Sep 17 00:00:00 2001 From: "Bharat (OpenERP)" Date: Tue, 13 Sep 2011 18:41:02 +0530 Subject: [PATCH] [IMP] account : defined context above for loop in invoice.py bzr revid: bde@tinyerp.com-20110913131102-qrkb4b8dhkjmxgsa --- addons/account/invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 57fcb998df7..efbf3605059 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -860,9 +860,9 @@ class account_invoice(osv.osv): if totlines: res_amount_currency = total_currency i = 0 + ctx = context.copy() + ctx.update({'date':inv.date_invoice}) for t in totlines: - ctx = context.copy() - ctx.update({'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=ctx) else: