[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:
parent
12fc5ea840
commit
ff902f62e2
|
@ -203,7 +203,7 @@ class ir_translation(osv.osv):
|
||||||
#Also not removing lang from context trigger an error when lang is different
|
#Also not removing lang from context trigger an error when lang is different
|
||||||
context_wo_lang = context.copy()
|
context_wo_lang = context.copy()
|
||||||
context_wo_lang.pop('lang', None)
|
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)
|
return self.write(cr, uid, id, {'src': value}, context=context)
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
|
|
Loading…
Reference in New Issue