fix bug "index out of range"

bzr revid: christophe@tinyerp.com-20081009125424-4v5r4di0i3uzvzrd
This commit is contained in:
Christophe Simonis
2008-10-09 14:54:24 +02:00
parent aeb0e309c6
commit 6e0856080a
@@ -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