From a2d055dc6158d32ae38efbed5cd66b4e0fe3cf23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 13 Nov 2010 04:14:42 +0100 Subject: [PATCH] Call get_preferences with user instead of root --- proteus/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proteus/config.py b/proteus/config.py index 2cccbe3048..fa1baef8d4 100644 --- a/proteus/config.py +++ b/proteus/config.py @@ -131,7 +131,8 @@ class TrytondConfig(Config): self.user = user_obj.search([ ('login', '=', user), ], limit=1)[0] - self._context = user_obj.get_preferences(context_only=True) + with transaction.set_user(self.user): + self._context = user_obj.get_preferences(context_only=True) Cache.resets(database_name) __init__.__doc__ = object.__init__.__doc__