[FIX] orm: avoid passing undefined context in browse_record getattr()
bzr revid: odo@openerp.com-20110913144702-7g56odiorqdiea28
This commit is contained in:
parent
6fa6d8369c
commit
863f0d003f
|
@ -328,7 +328,7 @@ class browse_record(object):
|
|||
attr = getattr(self._table, name)
|
||||
if isinstance(attr, (types.MethodType, types.LambdaType, types.FunctionType)):
|
||||
def function_proxy(*args, **kwargs):
|
||||
if 'context' not in kwargs:
|
||||
if 'context' not in kwargs and self._context:
|
||||
kwargs.update(context=self._context)
|
||||
return attr(self._cr, self._uid, [self._id], *args, **kwargs)
|
||||
return function_proxy
|
||||
|
|
Loading…
Reference in New Issue