From c38afbc1ead1ae89e8257b45099ca4e05b8d51f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 9 Apr 2018 10:48:21 +0200 Subject: [PATCH] Disable active test when searching user issue7329 review37231002 --- proteus/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/proteus/config.py b/proteus/config.py index 22b1f61e5a..4270db14cf 100644 --- a/proteus/config.py +++ b/proteus/config.py @@ -238,9 +238,10 @@ class TrytondConfig(Config): with Transaction().start(self.database_name, 0) as transaction: User = self.pool.get('res.user') transaction.context = self.context - self.user = User.search([ - ('login', '=', user), - ], limit=1)[0].id + with transaction.set_context(active_test=False): + self.user = User.search([ + ('login', '=', user), + ], limit=1)[0].id with transaction.set_user(self.user): self._context = User.get_preferences(context_only=True) __init__.__doc__ = object.__init__.__doc__