[FIX] base: update of source value in translation

Make sure pass a list of ids instead of a single id to write calls.
Some models (e.g. blog.post, fixed at 12fc5ea) are assuming that it got a list
of ids and is not checking the type.
Always pass a list of ids as it's the expected format for the orm.
This commit is contained in:
Robert Rübner 2015-03-25 14:07:28 +01:00 committed by Martin Trigaux
parent 12fc5ea840
commit ff902f62e2
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ class ir_translation(osv.osv):
#Also not removing lang from context trigger an error when lang is different
context_wo_lang = context.copy()
context_wo_lang.pop('lang', None)
model.write(cr, uid, record.res_id, {field: value}, context=context_wo_lang)
model.write(cr, uid, [record.res_id], {field: value}, context=context_wo_lang)
return self.write(cr, uid, id, {'src': value}, context=context)
_columns = {