From: Christophe Simonis Date: Thu, 9 Oct 2008 12:54:24 +0000 (+0200) Subject: fix bug "index out of range" X-Git-Tag: 5.0.0-alpha-addons~237^2~8^2 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=6e0856080a5ad6ada3e40ef2257f691c8d77a70b;p=odoo%2Fodoo.git fix bug "index out of range" bzr revid: christophe@tinyerp.com-20081009125424-4v5r4di0i3uzvzrd --- diff --git a/addons/base_module_record/base_module_record.py b/addons/base_module_record/base_module_record.py index e01ec76..32e6a82 100644 --- a/addons/base_module_record/base_module_record.py +++ b/addons/base_module_record/base_module_record.py @@ -210,14 +210,16 @@ base_module_record() def fnct_call(fnct): def execute(*args, **argv): - if type(args[5])==type({}): - _old_args=args[5].copy() + if len(args) >= 6 and isinstance(args[5], dict): + _old_args = args[5].copy() + else: + _old_args = None res = fnct(*args, **argv) pool = pooler.get_pool(args[0]) mod = pool.get('ir.module.record') if mod and mod.recording: if args[4] not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc'): - if type(args[5])==type({}): + if _old_args is not None: args[5].update(_old_args) mod.recording_data.append(('query', args, argv,res)) return res