[IMP] base: Only show uninstalled languages on install wizard

This commit is contained in:
Yannick Tivisse
2017-07-06 14:12:49 +02:00
parent e79eb01a67
commit 1e2e55872f
+2 -2
View File
@@ -196,8 +196,8 @@ class Lang(models.Model):
@api.model
@tools.ormcache()
def get_available(self):
""" Return the available languages as a list of (code, name) sorted by name. """
langs = self.with_context(active_test=False).search([])
""" Return the available languages to install as a list of (code, name) sorted by name. """
langs = self.search([('active', '=', False)])
return sorted([(lang.code, lang.name) for lang in langs], key=itemgetter(1))
@api.model