Merge PR #1432 into 16.0

Signed-off-by hbrunn
pull/1441/head
OCA-git-bot 2024-09-11 08:47:28 +00:00
commit 523c60ef42
2 changed files with 3 additions and 3 deletions

View File

@ -87,7 +87,7 @@ class TestMailTemplateSubstitute(TransactionCase):
self.smt1.mail_template_substitution_rule_ids.domain = "[]"
self.mail_compose.with_context(
active_ids=self.partners.ids
).onchange_template_id_wrapper()
)._onchange_template_id_wrapper()
self.assertEqual(self.mail_compose.template_id, self.smt2)
def test_default_get(self):

View File

@ -32,10 +32,10 @@ class MailComposeMessage(models.TransientModel):
return result
@api.onchange("template_id")
def onchange_template_id_wrapper(self):
def _onchange_template_id_wrapper(self):
substitution_template = self._get_substitution_template(
self.composition_mode, self.template_id, [self.res_id]
)
if substitution_template:
self.template_id = substitution_template
return super().onchange_template_id_wrapper()
return super()._onchange_template_id_wrapper()