[FIX] osv.osv: code cleanup after merging previous patches

bzr revid: odo@openerp.com-20101124164041-760b4zoidv0omu6c
This commit is contained in:
Olivier Dony
2010-11-24 17:40:41 +01:00
parent 458d7c7dea
commit 276a54b0af
+1 -6
View File
@@ -62,18 +62,14 @@ class osv_pool(netsvc.Service):
if not kwargs:
if args and isinstance(args[-1], dict):
ctx = args[-1]
else:
ctx = {}
elif isinstance(kwargs, dict):
ctx = kwargs.get('context', {})
else:
ctx = {}
uid = 1
if args and isinstance(args[0], (long, int)):
uid = args[0]
lang = ctx and ctx.get('lang', False)
lang = ctx and ctx.get('lang')
if not (lang or hasattr(src, '__call__')):
return src
@@ -105,7 +101,6 @@ class osv_pool(netsvc.Service):
try:
cr = pooler.get_db_only(dbname).cursor()
#return trans_obj._get_source( name=?)
res = translate(cr, name=False, source_type=ttype,
lang=lang, source=src)
if res: