Fix: exception was raised when no langage was set in context at write time.

This commit is contained in:
Bertrand Chenal committed 2008-02-11 22:25:55 +01:00
1 parent 39b81eda88
commit d2c71fd935
1 file changed
+1 -1
+1 -1
View File
@@ -1427,7 +1427,7 @@ class ORM(object):
if self._columns[field].translate:
self.pool.get('ir.translation')._set_ids(cursor, user,
self._name + ',' + field, 'model',
context['language'], ids, vals[field])
context.get('language','en_US'), ids, vals[field])
# call the 'set' method of fields which are not classic_write
upd_todo.sort(lambda x, y: self._columns[x].priority - \