[FIX] account: Use the category 'Account Charts' for the wizard of Chart of Accounts

bzr revid: stw@openerp.com-20111103144039-fqikzqv88ka89yxs
This commit is contained in:
Stephane Wirtel 2011-11-03 15:40:39 +01:00
parent 2930432219
commit e9600b8256
1 changed files with 3 additions and 1 deletions

View File

@ -38,7 +38,9 @@ class account_installer(osv.osv_memory):
def _get_charts(self, cr, uid, context=None):
modules = self.pool.get('ir.module.module')
ids = modules.search(cr, uid, [('name', 'like', 'l10n_')], context=context)
# Looking for the module with the 'Account Charts' category
category_name, category_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'module_category_localization_account_charts')
ids = modules.search(cr, uid, [('category_id', '=', category_id)], context=context)
charts = list(
sorted(((m.name, m.shortdesc)
for m in modules.browse(cr, uid, ids, context=context)),