From 65d1777b65c6ade6ef69ecb82ff389a5b1e1e2cf Mon Sep 17 00:00:00 2001 From: Thibault Francois Date: Thu, 21 Oct 2010 14:42:13 +0200 Subject: [PATCH] [FIX] translation : properly check model in default_get of translation synchro wizard bzr revid: tfr@openerp.com-20101021124213-4bvaaqs2tp2nsn41 --- bin/addons/base/module/wizard/base_update_translations.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/addons/base/module/wizard/base_update_translations.py b/bin/addons/base/module/wizard/base_update_translations.py index 94cb0ee2e18..b413e9d7093 100644 --- a/bin/addons/base/module/wizard/base_update_translations.py +++ b/bin/addons/base/module/wizard/base_update_translations.py @@ -52,6 +52,10 @@ class base_update_translations(osv.osv_memory): def default_get(self, cr, uid, fields, context=None): res = super(base_update_translations, self).default_get(cr, uid, fields, context=context) + + if context.get('active_model') != "res.lang": + return res + record_id = context and context.get('active_id', False) or False if record_id: lang = self.pool.get('res.lang').browse(cr, uid, record_id).code