From ff902f62e249b2134c9c7129f9cf6e8a8107fb1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Ru=CC=88bner?= Date: Wed, 25 Mar 2015 14:07:28 +0100 Subject: [PATCH] [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. --- openerp/addons/base/ir/ir_translation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/ir/ir_translation.py b/openerp/addons/base/ir/ir_translation.py index 14fe9000334..a69c30a55ba 100644 --- a/openerp/addons/base/ir/ir_translation.py +++ b/openerp/addons/base/ir/ir_translation.py @@ -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 = {