[FIX] account: replace query by search

bzr revid: mra@mra-laptop-20110321133657-o5uidd2kzj5hse1c
This commit is contained in:
Mustufa Rangwala 2011-03-21 19:06:57 +05:30
parent d83939845b
commit f6b912e60c
1 changed files with 1 additions and 2 deletions

View File

@ -36,8 +36,7 @@ class account_installer(osv.osv_memory):
def _get_charts(self, cr, uid, context=None):
modules = self.pool.get('ir.module.module')
cr.execute("SELECT id FROM ir_module_module WHERE name like 'l10n_%'")
ids = [r[0] for r in cr.fetchall()]
ids = modules.search(cr, uid, [('name', 'like', 'l10n_%')], context=context)
charts = list(
sorted(((m.name, m.shortdesc)
for m in modules.browse(cr, uid, ids, context=context)),