From 4c65b5fbcc430dda6e246415e4629f0c5cfa4039 Mon Sep 17 00:00:00 2001 From: "Naresh (OpenERP)" Date: Thu, 21 Apr 2011 12:06:28 +0530 Subject: [PATCH] [FIX]:printscreen report Title not getting translated value lp bug: https://launchpad.net/bugs/728173 fixed bzr revid: nch@tinyerp.com-20110421063628-1hy46os11im1qh0i --- openerp/report/printscreen/ps_list.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openerp/report/printscreen/ps_list.py b/openerp/report/printscreen/ps_list.py index 851945922ab..8b0ece6eaa0 100644 --- a/openerp/report/printscreen/ps_list.py +++ b/openerp/report/printscreen/ps_list.py @@ -67,11 +67,12 @@ class report_printscreen_list(report_int): self.groupby_no_leaf = context.get('group_by_no_leaf',False) pool = pooler.get_pool(cr.dbname) model = pool.get(datas['model']) - # Title come from description of model which are specified in py file. + model_id = pool.get('ir.model').search(cr, uid, [('model','=',model._name)]) model_desc = model._description + if model_id: + model_desc = pool.get('ir.model').browse(cr, uid, model_id[0], context).name self.title = model_desc datas['ids'] = ids - model = pooler.get_pool(cr.dbname).get(datas['model']) result = model.fields_view_get(cr, uid, view_type='tree', context=context) fields_order = self.groupby + self._parse_string(result['arch']) if self.groupby: