diff --git a/mail_optional_autofollow/__manifest__.py b/mail_optional_autofollow/__manifest__.py index af3457ddce..7d0917adb7 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": "15.0.1.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "depends": ["mail"], "data": ["wizard/mail_compose_message_view.xml"], diff --git a/mail_optional_autofollow/wizard/mail_compose_message.py b/mail_optional_autofollow/wizard/mail_compose_message.py index 665364cc02..b8f7d1b7cb 100644 --- a/mail_optional_autofollow/wizard/mail_compose_message.py +++ b/mail_optional_autofollow/wizard/mail_compose_message.py @@ -22,9 +22,15 @@ def default_get(self, fields_list): ) 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 diff --git a/setup/mail_optional_autofollow/odoo/addons/mail_optional_autofollow b/setup/mail_optional_autofollow/odoo/addons/mail_optional_autofollow new file mode 120000 index 0000000000..382ffdb7d7 --- /dev/null +++ b/setup/mail_optional_autofollow/odoo/addons/mail_optional_autofollow @@ -0,0 +1 @@ +../../../../mail_optional_autofollow \ No newline at end of file diff --git a/setup/mail_optional_autofollow/setup.py b/setup/mail_optional_autofollow/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/mail_optional_autofollow/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)