[FIX] Load translation wizard could not properly redirect when only one language is installed

bzr revid: fme@openerp.com-20131030142955-482vt76w67zerui2
This commit is contained in:
Fabien Meghazi 2013-10-30 15:29:55 +01:00
parent 500804a7c8
commit 2e429fff8b
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ def url_for(path, lang=None, keep_query=None):
if request:
path = urljoin(request.httprequest.path, path)
langs = request.context.get('langs')
if path[0] == '/' and len(langs) > 1:
if path[0] == '/' and (len(langs) > 1 or lang):
ps = path.split('/')
lang = lang or request.context.get('lang')
if ps[1] in langs: