[IMP] code style; also remove a debug comment
bzr revid: abo@openerp.com-20120928165239-04lcfyt1t9ffdhkk
This commit is contained in:
@@ -195,7 +195,7 @@ class res_company(osv.osv):
|
||||
]
|
||||
|
||||
ids = proxy.search(cr, uid, args, context=context)
|
||||
user = self.pool.get('res.users').browse(cr, SUPERUSER_ID, [uid], ['company_id'], context=context)[0]
|
||||
user = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, ['company_id'], context=context)
|
||||
for rule in proxy.browse(cr, uid, ids, context):
|
||||
if eval(rule.expression, {'context': context, 'user': user}):
|
||||
return rule.company_dest_id.id
|
||||
|
||||
+1
-3
@@ -120,9 +120,7 @@ class object_proxy(object):
|
||||
raise except_osv('Database not ready', 'Currently, this database is not fully loaded and can not be used.')
|
||||
return f(self, dbname, *args, **kwargs)
|
||||
except orm.except_orm, inst:
|
||||
raise
|
||||
# TDE: commented to have more valuable stack traces
|
||||
# raise except_osv(inst.name, inst.value)
|
||||
raise except_osv(inst.name, inst.value)
|
||||
except except_osv:
|
||||
raise
|
||||
except IntegrityError, inst:
|
||||
|
||||
Reference in New Issue
Block a user