[FIX] Account : Context was missing in report
authorJay (Open ERP) <jvo@tinyerp.com>
Tue, 8 Sep 2009 13:33:40 +0000 (19:03 +0530)
committerJay (Open ERP) <jvo@tinyerp.com>
Tue, 8 Sep 2009 13:33:40 +0000 (19:03 +0530)
lp bug: https://launchpad.net/bugs/426243 fixed

bzr revid: jvo@tinyerp.com-20090908133340-z0xy8i6uouoff122

addons/account/report/overdue.py

index dca2f6a..76ebbe7 100644 (file)
@@ -29,14 +29,14 @@ import pooler
 
 class Overdue(report_sxw.rml_parse):
     def __init__(self, cr, uid, name, context):
-        super(Overdue, self).__init__(cr, uid, name, context)
+        super(Overdue, self).__init__(cr, uid, name, context=context)
         self.localcontext.update( {
             'time' : time,
             'adr_get' : self._adr_get,
             'getLines' : self._lines_get,
             'tel_get' : self._tel_get,
         })
-
+        self.context = context
     def _adr_get(self, partner, type):
         res = []
         res_partner = pooler.get_pool(self.cr.dbname).get('res.partner')
@@ -51,7 +51,7 @@ class Overdue(report_sxw.rml_parse):
                   'country_id' : False,
                  }
         if adr_id:
-            result = res_partner_address.read(self.cr, self.uid, [adr_id])
+            result = res_partner_address.read(self.cr, self.uid, [adr_id],context=self.context.copy())
             result[0]['country_id'] = result[0]['country_id'] and result[0]['country_id'][1] or False
             return result