~crass/tryton/server

« back to all changes in this revision

Viewing changes to trytond/ir/property.py

  • Committer: Mathias Behrle
  • Date: 2013-11-24 16:28:54 UTC
  • Revision ID: git-v1:182d6cce169eab1682eeacbad4323efa1136a1a0
MergingĀ upstreamĀ versionĀ 3.0.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
    @classmethod
25
25
    def models_get(cls):
 
26
        pool = Pool()
 
27
        Model = pool.get('ir.model')
26
28
        models = cls._models_get_cache.get(None)
27
29
        if models:
28
30
            return models
29
31
        cursor = Transaction().cursor
30
 
        cursor.execute('SELECT model, name FROM ir_model ORDER BY name ASC')
 
32
        model = Model.__table__()
 
33
        cursor.execute(*model.select(model.model, model.name,
 
34
                order_by=model.name.asc))
31
35
        models = cursor.fetchall() + [('', '')]
32
36
        cls._models_get_cache.set(None, models)
33
37
        return models