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

This commit is contained in:
Raphael Collet
2015-10-26 17:28:21 +01:00
parent d4b91ccd34
commit 16bf2e9402
+2 -2
View File
@@ -195,8 +195,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 UserError(_("Language code cannot be modified."))
self._lang_get.clear_cache(self)
self._lang_data_get.clear_cache(self)