diff --git a/bin/report/printscreen/ps_form.py b/bin/report/printscreen/ps_form.py index 312d5480a93..80df82d21bb 100644 --- a/bin/report/printscreen/ps_form.py +++ b/bin/report/printscreen/ps_form.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -54,17 +54,18 @@ class report_printscreen_list(report_int): if not context: context={} datas['ids'] = ids - pool = pooler.get_pool(cr.dbname) - model_id = pool.get('ir.model').search(cr, uid, [('model','=',model._description)]) - if model_id: - model_desc = pool.get('ir.model').browse(cr, uid, model_id, context).description - self.title = model_desc - else: - model_desc = model._description - self.title = model_desc - model = pool.get(datas['model']) - result = model.fields_view_get(cr, uid, view_type='tree', context=context) + pool = pooler.get_pool(cr.dbname) +# model_id = pool.get('ir.model').search(cr, uid, [('model','=',model._description)]) +# if model_id: +# model_desc = pool.get('ir.model').browse(cr, uid, model_id, context).description +# self.title = model_desc +# else: +# model_desc = model._description + self.title = model._description + + + result = model.fields_view_get(cr, uid, view_type='form', context=context) fields_order = self._parse_string(result['arch']) rows = model.read(cr, uid, datas['ids'], result['fields'].keys() ) diff --git a/bin/report/printscreen/ps_list.py b/bin/report/printscreen/ps_list.py index 9525e0dd19d..695407d64d1 100644 --- a/bin/report/printscreen/ps_list.py +++ b/bin/report/printscreen/ps_list.py @@ -65,13 +65,13 @@ 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']) - model_id = pool.get('ir.model').search(cr, uid, [('model','=',model._description)]) - if model_id: - model_desc = pool.get('ir.model').browse(cr, uid, model_id[0], context).description - self.title = model_desc - else: - model_desc = model._description - self.title = model_desc +# model_id = pool.get('ir.model').search(cr, uid, [('model','=',model._name)]) +# if model_id: +# model_desc = pool.get('ir.model').browse(cr, uid, model_id[0], context).description +# self.title = model_desc +# else: + model_desc = model._description + self.title = model._description datas['ids'] = ids model = pooler.get_pool(cr.dbname).get(datas['model']) result = model.fields_view_get(cr, uid, view_type='tree', context=context)