From a317f78068d0e5a1a473a7826e9e1f0e33fbf9fb Mon Sep 17 00:00:00 2001 From: "Olivier Monnom (mool)" Date: Mon, 20 Nov 2023 14:03:19 +0100 Subject: [PATCH] [FIX] mass_mailing: added _get_translation_frontend_modules_name Before: When a user receive a mass_mailing and click on the unsubscribe button, he arrives on the unsubscribe webpage where the first sentence stay in english whatever the website language Step to reproduce: - Create a db with the email marketing and web module - Create a mailing list with at least one recipient - Send the mailing (catch the email with an email catcher, ex: mailhog) - Click on the unsubscribe button Now: The first sentence is in the website (or portal) language opw-3538873 closes odoo/odoo#152579 X-original-commit: 6ba3dc277b9bf6b093eeefe889f20734ae4d135b Signed-off-by: Thibault Delavallee (tde) --- addons/mass_mailing/models/__init__.py | 1 + addons/mass_mailing/models/ir_http.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 addons/mass_mailing/models/ir_http.py diff --git a/addons/mass_mailing/models/__init__.py b/addons/mass_mailing/models/__init__.py index 9a89811e7cc..1fc3a01277b 100644 --- a/addons/mass_mailing/models/__init__.py +++ b/addons/mass_mailing/models/__init__.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. +from . import ir_http from . import ir_mail_server from . import ir_model from . import link_tracker diff --git a/addons/mass_mailing/models/ir_http.py b/addons/mass_mailing/models/ir_http.py new file mode 100644 index 00000000000..3dd9ad508d4 --- /dev/null +++ b/addons/mass_mailing/models/ir_http.py @@ -0,0 +1,12 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import models + + +class IrHttp(models.AbstractModel): + _inherit = "ir.http" + + @classmethod + def _get_translation_frontend_modules_name(cls): + mods = super()._get_translation_frontend_modules_name() + return mods + ["mass_mailing"]