[FIX] Audittrail : System was crashing if I audit Users (ref : 4527)

bzr revid: jvo@openerp.com-20110321101637-5h0ir8ew1jg0j817
This commit is contained in:
Jay (OpenERP) 2011-03-21 15:46:37 +05:30
parent 82de026e8f
commit e767f08a85
1 changed files with 10 additions and 7 deletions

View File

@ -404,13 +404,16 @@ class audittrail_objects_proxy(object_proxy):
cr.close()
return res
else:
res_ids = args[0]
old_values = {}
fields = []
if len(args)>1 and type(args[1]) == dict:
fields = args[1].keys()
if type(res_ids) in (long, int):
res_ids = [res_ids]
res_ids = []
res = True
if args:
res_ids = args[0]
old_values = {}
fields = []
if len(args)>1 and type(args[1]) == dict:
fields = args[1].keys()
if type(res_ids) in (long, int):
res_ids = [res_ids]
if res_ids:
for resource in resource_pool.read(cr, uid, res_ids):
resource_id = resource['id']