[IMP] the working of ctx variable in invoice.py
authorBharat (OpenERP) <bde@tinyerp.com>
Fri, 12 Aug 2011 10:43:43 +0000 (16:13 +0530)
committerBharat (OpenERP) <bde@tinyerp.com>
Fri, 12 Aug 2011 10:43:43 +0000 (16:13 +0530)
bzr revid: bde@tinyerp.com-20110812104343-0e1z58s4whuy59ia

addons/account/invoice.py

index 95fb3ed..2796bf7 100644 (file)
@@ -862,7 +862,7 @@ class account_invoice(osv.osv):
                 i = 0
                 for t in totlines:
                     ctx = context.copy()
-                    ctx = {'date':inv.date_invoice}
+                    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)