Skip to content

Commit

Permalink
[IMP] mail_notification_custom_subject: Make the subject_template fie…
Browse files Browse the repository at this point in the history
…ld translatable

TT52259
  • Loading branch information
victoralmau committed Dec 20, 2024
1 parent 32e72be commit f2d95df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class MailMessageCustomSubject(models.Model):
)
subject_template = fields.Char(
required=True,
translate=True,
help="Subject (placeholders may be used here)",
)
position = fields.Selection(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,27 @@
# Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=C8107
from odoo.tests import common
from odoo.tests import new_test_user
from odoo.tools import mute_logger

from odoo.addons.base.tests.common import BaseCommon

class TestMailNotificationCustomSubject(common.TransactionCase):

class TestMailNotificationCustomSubject(BaseCommon):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.partner_1, cls.partner_2 = (
cls.env["res.partner"]
.with_context(tracking_disable=True)
.create(
[
{"name": "Test partner 1", "email": "[email protected]"},
{"name": "Test partner 2", "email": "[email protected]"},
]
)
cls.partner_1, cls.partner_2 = cls.env["res.partner"].create(
[
{"name": "Test partner 1", "email": "[email protected]"},
{"name": "Test partner 2", "email": "[email protected]"},
]
)
cls.admin = common.new_test_user(cls.env, "boss", "base.group_system")
cls.admin = new_test_user(cls.env, "boss", "base.group_system")

def setUp(self):
super().setUp()
self.uid = common.new_test_user(self.env, "worker")
self.uid = new_test_user(self.env, "worker")

def test_email_subject_template_overrides(self):
with self.with_user("boss"):
Expand Down

0 comments on commit f2d95df

Please sign in to comment.