Reset CONTEXT after call user.get_preferences to not lost context if there is
a error in the call
This commit is contained in:
+1
-1
@@ -137,12 +137,12 @@ def logout():
|
||||
|
||||
def context_reload():
|
||||
global CONTEXT, TIMEZONE
|
||||
CONTEXT = {}
|
||||
user = RPCProxy('res.user')
|
||||
try:
|
||||
context = user.get_preferences(True, {})
|
||||
except:
|
||||
return
|
||||
CONTEXT = {}
|
||||
for i in context:
|
||||
value = context[i]
|
||||
CONTEXT[i] = value
|
||||
|
||||
Reference in New Issue
Block a user