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