~openupgrade-committers/openupgrade-server/6.0

« back to all changes in this revision

Viewing changes to bin/report/printscreen/ps_list.py

  • Committer: Stefan Rijnhart
  • Date: 2012-05-09 12:52:49 UTC
  • mfrom: (3475.1.142 openobject-server)
  • Revision ID: stefan@therp.nl-20120509125249-llcqw330h6u9xls0
[MRG] Merged with main

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        self.groupby_no_leaf = context.get('group_by_no_leaf',False)
69
69
        pool = pooler.get_pool(cr.dbname)
70
70
        model = pool.get(datas['model'])
71
 
        # Title come from description of model which are specified in py file.
 
71
        model_id = pool.get('ir.model').search(cr, uid, [('model','=',model._name)])
72
72
        model_desc = model._description
 
73
        if model_id:
 
74
            model_desc = pool.get('ir.model').browse(cr, uid, model_id[0], context).name
73
75
        self.title = model_desc
74
76
        datas['ids'] = ids
75
 
        model = pooler.get_pool(cr.dbname).get(datas['model'])
76
77
        result = model.fields_view_get(cr, uid, view_type='tree', context=context)
77
78
        fields_order =  self.groupby + self._parse_string(result['arch'])
78
79
        if self.groupby: