[MIG] mail_optional_autofollow: Migration to 16.0

This commit is contained in:
Benoit Aimont 2022-08-23 14:51:48 +02:00
parent 2a930968ae
commit 001c95616b
4 changed files with 16 additions and 3 deletions

View File

@ -8,7 +8,7 @@
"author": "ACSONE SA/NV," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/social",
"category": "Social Network",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"depends": ["mail"],
"data": ["wizard/mail_compose_message_view.xml"],

View File

@ -22,9 +22,15 @@ class MailComposeMessage(models.TransientModel):
)
def _action_send_mail(self, auto_commit=False):
result_mails_su, result_messages = (
self.env["mail.mail"].sudo(),
self.env["mail.message"],
)
for wizard in self:
super(
result_mails_su_wizard, result_messages_wizard = super(
MailComposeMessage,
wizard.with_context(mail_post_autofollow=wizard.autofollow_recipients),
)._action_send_mail(auto_commit=auto_commit)
return True
result_mails_su += result_mails_su_wizard
result_messages += result_messages_wizard
return result_mails_su, result_messages

View File

@ -0,0 +1 @@
../../../../mail_optional_autofollow

View File

@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)