diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-04-16 18:34:56 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-04-16 18:34:56 +0200 |
| commit | 5f2d080cf85d54bc52895f9dbc4075b10989d324 (patch) | |
| tree | c925509b609fb07f6fbef8896710b756c3c6a86f /addons/website | |
| parent | 026be48ccbbb15daefda070697b135f089f49564 (diff) | |
| parent | ad825b673b57344a6a1571234f62a0b3aa543bf7 (diff) | |
[MERGE] forward port branch 11.0 up to ad825b673b5
Diffstat (limited to 'addons/website')
| -rw-r--r-- | addons/website/controllers/main.py | 11 | ||||
| -rw-r--r-- | addons/website/models/ir_http.py | 7 |
2 files changed, 6 insertions, 12 deletions
diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py index 425859decd9..62d862afe35 100644 --- a/addons/website/controllers/main.py +++ b/addons/website/controllers/main.py @@ -295,17 +295,6 @@ class Website(Home): modules.button_immediate_upgrade() return request.redirect(redirect) - @http.route('/website/translations', type='json', auth="public", website=True) - def get_website_translations(self, lang, mods=None): - Modules = request.env['ir.module.module'].sudo() - modules = Modules.search([ - '|', ('name', 'ilike', 'website'), ('name', '=', 'web_editor'), - ('state', '=', 'installed') - ]).mapped('name') - if mods: - modules += mods - return WebClient().translations(mods=modules, lang=lang) - @http.route(['/website/publish'], type='json', auth="public", website=True) def publish(self, id, object): Model = request.env[object] diff --git a/addons/website/models/ir_http.py b/addons/website/models/ir_http.py index ba58f790597..0e5443ad79e 100644 --- a/addons/website/models/ir_http.py +++ b/addons/website/models/ir_http.py @@ -17,7 +17,7 @@ from odoo.http import request from odoo.tools import config from odoo.exceptions import QWebException from odoo.tools.safe_eval import safe_eval -from odoo.osv.expression import FALSE_DOMAIN +from odoo.osv.expression import FALSE_DOMAIN, OR from odoo.addons.http_routing.models.ir_http import ModelConverter, _guess_mimetype from odoo.addons.portal.controllers.portal import _build_url_w_params @@ -105,6 +105,11 @@ class Http(models.AbstractModel): return super(Http, cls)._get_default_lang() @classmethod + def _get_translation_frontend_modules_domain(cls): + domain = super(Http, cls)._get_translation_frontend_modules_domain() + return OR([domain, [('name', 'ilike', 'website')]]) + + @classmethod def _serve_page(cls): req_page = request.httprequest.path |
