Corrected method name override _onchange_template_id_wrapper

pull/1432/head
DoDo 2024-08-09 12:04:12 +02:00
parent 0e22d5ec6a
commit e35fc9e400
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()