If the website default language is not en_US, qweb fields are not translatable in en_US (and thus can't be translated) because: - the code expected en_US to be the default language. - there was a error in website _dispatch opw-746776 closes #17939
17 lines
665 B
Python
17 lines
665 B
Python
# -*- coding: utf-8 -*-
|
|
from openerp.osv import orm
|
|
from openerp.http import request
|
|
|
|
|
|
class ir_http(orm.AbstractModel):
|
|
_inherit = 'ir.http'
|
|
|
|
def _dispatch(self):
|
|
if 'editable' in request.httprequest.args and 'editable' not in request.context:
|
|
request.context['editable'] = True
|
|
if 'edit_translations' in request.httprequest.args and 'edit_translations' not in request.context:
|
|
request.context['edit_translations'] = True
|
|
if request.context.get('edit_translations') and 'translatable' not in request.context:
|
|
request.context['translatable'] = True
|
|
return super(ir_http, self)._dispatch()
|