diff --git a/openerp/report/interface.py b/openerp/report/interface.py index fca5121896f..5bb1224a549 100644 --- a/openerp/report/interface.py +++ b/openerp/report/interface.py @@ -49,6 +49,7 @@ class report_int(netsvc.Service): self.name = name self.id = 0 self.name2 = '.'.join(name.split('.')[1:]) + # TODO the reports have methods with a 'title' kwarg that is redundant with this attribute self.title = None #self.joinGroup('report') self.exportMethod(self.create) 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: