From d9a22d2702b9568dd31eb4a7f9c2a890a1fa7252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 21 Jan 2010 21:03:29 +0100 Subject: [PATCH] Remove user from context when bypassing rules --- trytond/ir/sequence.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trytond/ir/sequence.py b/trytond/ir/sequence.py index 939d06bab4..ec0bbf2611 100644 --- a/trytond/ir/sequence.py +++ b/trytond/ir/sequence.py @@ -108,6 +108,9 @@ class Sequence(ModelSQL, ModelView): domain = [('id', '=', domain)] # bypass rules on sequences + if 'user' in context: + context = context.copy() + del context['user'] sequence_ids = self.search(cursor, 0, domain, limit=1, context=context) date = context.get('date')