From e8bdcd5550dff9d5d5051aaa9ce60abb4f63abc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Tue, 10 Dec 2013 12:01:30 +0100 Subject: [PATCH] Set the context's user when fetching user preferences The call to _get_preferences makes some processing based on the user of the context. In order for those computations to return the right value the context must be set when instanciating the user. issue3068 review1711002 --- trytond/res/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/res/user.py b/trytond/res/user.py index db829105b2..d3e714042e 100644 --- a/trytond/res/user.py +++ b/trytond/res/user.py @@ -337,7 +337,7 @@ class User(ModelSQL, ModelView): if preferences is not None: return preferences.copy() user = Transaction().user - with Transaction().set_user(0): + with Transaction().set_user(0, set_context=True): user = cls(user) preferences = cls._get_preferences(user, context_only=context_only) cls._get_preferences_cache.set(key, preferences)