[FIX] User / Preferences should always display translatable languages.
authorJay (Open ERP) <jvo@tinyerp.com>
Wed, 12 May 2010 06:53:31 +0000 (12:23 +0530)
committerJay (Open ERP) <jvo@tinyerp.com>
Wed, 12 May 2010 06:53:31 +0000 (12:23 +0530)
lp bug: https://launchpad.net/bugs/516965 fixed

bzr revid: jvo@tinyerp.com-20100512065331-2kwk9yprxxkv70ba

bin/addons/base/res/res_user.py

index e617591..014da9e 100644 (file)
@@ -106,10 +106,11 @@ roles()
 
 def _lang_get(self, cr, uid, context={}):
     obj = self.pool.get('res.lang')
-    ids = obj.search(cr, uid, [])
+    ids = obj.search(cr, uid, [('translatable','=',True)])
     res = obj.read(cr, uid, ids, ['code', 'name'], context)
     res = [(r['code'], r['name']) for r in res]
     return res
+
 def _tz_get(self,cr,uid, context={}):
     return [(x, x) for x in pytz.all_timezones]