[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
This commit is contained in:
Bharat (OpenERP)
2011-08-02 12:57:04 +05:30
parent a776521464
commit 4a3b8f91e6
+3 -1
View File
@@ -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