bzr revid: fp@tinyerp.com-20081121235229-bchbrwj13vgry0v0
This commit is contained in:
Fabien Pinckaers 2008-11-22 00:52:29 +01:00
parent e2ef2a1782
commit 0c75507f55
1 changed files with 8 additions and 2 deletions

View File

@ -219,6 +219,7 @@ def log_fct( db, uid, passwd, object, method, fct_src , *args ):
lines.append(line)
create_log_line(cr,uid,id,model_object,lines)
cr.commit()
cr.close()
return res_id
if method in ('write'):
@ -247,6 +248,7 @@ def log_fct( db, uid, passwd, object, method, fct_src , *args ):
lines.append(line)
cr.commit()
create_log_line(cr,uid,id,model_object,lines)
cr.close()
return res
if method in ('read'):
@ -273,6 +275,7 @@ def log_fct( db, uid, passwd, object, method, fct_src , *args ):
lines.append(line)
cr.commit()
create_log_line(cr,uid,id,model_object,lines)
cr.close()
return res
if method in ('unlink'):
@ -296,7 +299,9 @@ def log_fct( db, uid, passwd, object, method, fct_src , *args ):
cr.commit()
create_log_line(cr,uid,id,model_object,lines)
res =fct_src( db, uid, passwd, object, method, *args)
cr.close()
return res
cr.close()
def tmp_fct(fct_src):
def execute( db, uid, passwd, object, method, *args):
@ -331,11 +336,12 @@ def tmp_fct(fct_src):
return log_fct(db, uid, passwd, object, method, fct_src , *args)
return fct_src( db, uid, passwd, object, method, *args)
cr.commit()
return my_fct( db, uid, passwd, object, method, *args)
res = my_fct( db, uid, passwd, object, method, *args)
cr.close()
return res
return execute
obj = netsvc._service['object']
obj.execute = tmp_fct(obj.execute)
obj.exportMethod(obj.execute)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: