Skip to content

Commit

Permalink
[MIG] mail_optional_autofollow: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
baimont committed Oct 3, 2022
1 parent 2a93096 commit 8179b48
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mail_optional_autofollow/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
10 changes: 8 additions & 2 deletions mail_optional_autofollow/wizard/mail_compose_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8179b48

Please sign in to comment.