[FIX] res_lang: fix confusion between class variable and local variable

This commit is contained in:
Raphael Collet 2015-10-26 17:27:01 +01:00
parent d5f35bf37d
commit 845c10fef2
1 changed files with 2 additions and 2 deletions

View File

@ -182,8 +182,8 @@ class lang(osv.osv):
def write(self, cr, uid, ids, vals, context=None):
if 'code' in vals:
for lang in self.browse(cr, uid, ids, context):
if lang.code != vals['code']:
for rec in self.browse(cr, uid, ids, context):
if rec.code != vals['code']:
raise osv.except_osv(_('User Error'), _("Language code cannot be modified."))
for lang_id in ids :
self._lang_data_get.clear_cache(self)