diff --git a/mail_optional_autofollow/__manifest__.py b/mail_optional_autofollow/__manifest__.py index 8b168aa..af3457d 100644 --- a/mail_optional_autofollow/__manifest__.py +++ b/mail_optional_autofollow/__manifest__.py @@ -8,7 +8,7 @@ "author": "ACSONE SA/NV," "Odoo Community Association (OCA)", "website": "https://github.com/OCA/social", "category": "Social Network", - "version": "13.0.1.0.0", + "version": "15.0.1.0.0", "license": "AGPL-3", "depends": ["mail"], "data": ["wizard/mail_compose_message_view.xml"], diff --git a/mail_optional_autofollow/tests/test_mail_optional_autofollow.py b/mail_optional_autofollow/tests/test_mail_optional_autofollow.py index 887a48c..805fe64 100644 --- a/mail_optional_autofollow/tests/test_mail_optional_autofollow.py +++ b/mail_optional_autofollow/tests/test_mail_optional_autofollow.py @@ -21,13 +21,13 @@ class TestAttachExistingAttachment(common.TransactionCase): } ) mail_compose = self.env["mail.compose.message"] - values = mail_compose.with_context(ctx).onchange_template_id( + values = mail_compose.with_context(**ctx)._onchange_template_id( False, "comment", "res.partner", self.partner_01.id )["value"] values["partner_ids"] = [(4, self.partner_02.id)] - compose_id = mail_compose.with_context(ctx).create(values) + compose_id = mail_compose.with_context(**ctx).create(values) compose_id.autofollow_recipients = False - compose_id.with_context(ctx).send_mail() + compose_id.with_context(**ctx).action_send_mail() res = self.env["mail.followers"].search( [ ("res_model", "=", "res.partner"), @@ -37,9 +37,9 @@ class TestAttachExistingAttachment(common.TransactionCase): ) # I check if the recipient isn't a follower self.assertEqual(len(res.ids), 0) - compose_id = mail_compose.with_context(ctx).create(values) + compose_id = mail_compose.with_context(**ctx).create(values) compose_id.autofollow_recipients = True - compose_id.with_context(ctx).send_mail() + compose_id.with_context(**ctx).action_send_mail() res = self.env["mail.followers"].search( [ ("res_model", "=", "res.partner"), diff --git a/mail_optional_autofollow/wizard/mail_compose_message.py b/mail_optional_autofollow/wizard/mail_compose_message.py index 8b3dd08..665364c 100644 --- a/mail_optional_autofollow/wizard/mail_compose_message.py +++ b/mail_optional_autofollow/wizard/mail_compose_message.py @@ -21,10 +21,10 @@ class MailComposeMessage(models.TransientModel): followers on the related object""", ) - def send_mail(self, auto_commit=False): + def _action_send_mail(self, auto_commit=False): for wizard in self: super( MailComposeMessage, wizard.with_context(mail_post_autofollow=wizard.autofollow_recipients), - ).send_mail(auto_commit=auto_commit) + )._action_send_mail(auto_commit=auto_commit) return True