[FIX] orm: avoid passing undefined context in browse_record getattr()

bzr revid: odo@openerp.com-20110913144702-7g56odiorqdiea28
This commit is contained in:
Olivier Dony 2011-09-13 16:47:02 +02:00
parent 6fa6d8369c
commit 863f0d003f
1 changed files with 1 additions and 1 deletions

View File

@ -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