2017-02-23 2 views
1

ich Anforderungskontext aktualisieren möchten,Update-Context in Odoo Controller (request.env.context)

request.env.context 

Im Moment habe ich dieses Wörterbuch

{'lang': u'en_US', 'tz': False, 'uid': 21} 

Ich möchte Update lang Schlüssel und erwartete Ausgabe von

request.env.context 
{'lang': 'de_DE', 'tz': False, 'uid': 21} 

Irgendeine Idee wie.

Antwort

2
context = request.env.context.copy() 
context.update({'lang': u'en_CA'}) 
request.env.context = context