Skip to content

Commit

Permalink
[IMP] mass_mailing: patch to allow slicing of remaing recipients
Browse files Browse the repository at this point in the history
  • Loading branch information
jdoutreloux committed Mar 28, 2024
1 parent ab6198a commit 4aa2355
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/mass_mailing/models/mailing.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,8 @@ def action_send_mail(self, res_ids=None):
# auto-commit except in testing mode
auto_commit = not getattr(threading.currentThread(), 'testing', False)
composer.send_mail(auto_commit=auto_commit)
mailing.write({'state': 'done', 'sent_date': fields.Datetime.now()})
if not mailing._get_remaining_recipients():
mailing.write({'state': 'done', 'sent_date': fields.Datetime.now()})
return True

def convert_links(self):
Expand Down

0 comments on commit 4aa2355

Please sign in to comment.