diff --git a/addons/mail/__manifest__.py b/addons/mail/__manifest__.py index e9054213..72c663b6 100644 --- a/addons/mail/__manifest__.py +++ b/addons/mail/__manifest__.py @@ -36,6 +36,7 @@ 'views/ir_actions_views.xml', 'views/ir_model_views.xml', 'views/res_partner_views.xml', + 'wizard/mass_mail.xml', ], 'demo': [ 'data/mail_demo.xml', diff --git a/addons/mail/wizard/__init__.py b/addons/mail/wizard/__init__.py index 6ec53a7f..2625f6bc 100644 --- a/addons/mail/wizard/__init__.py +++ b/addons/mail/wizard/__init__.py @@ -5,3 +5,5 @@ from . import invite from . import mail_compose_message from . import email_template_preview from . import base_module_uninstall +from . import mass_mail + diff --git a/addons/mail/wizard/mass_mail.py b/addons/mail/wizard/mass_mail.py new file mode 100644 index 00000000..af2345fe --- /dev/null +++ b/addons/mail/wizard/mass_mail.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Part of Flectra. See LICENSE file for full copyright and licensing details. + +from flectra import api, fields, models + + +class MassMail(models.TransientModel): + _name = 'mass.mail' + _description = 'Mass Mail Options' + + message = fields.Char('Message') + + @api.multi + def mass_emails(self): + send_method = self.env.context['mail'] + active_ids = self.env.context['active_ids'] + lines = self.env['mail.mail'].search([( 'id', 'in', active_ids)]) + if send_method == 'mark_outgoing': + lines.mark_outgoing() + elif send_method == 'send': + lines.send() + elif send_method == 'cancel': + lines.cancel() diff --git a/addons/mail/wizard/mass_mail.xml b/addons/mail/wizard/mass_mail.xml new file mode 100644 index 00000000..0b1e1dbc --- /dev/null +++ b/addons/mail/wizard/mass_mail.xml @@ -0,0 +1,71 @@ + + + + + mass.retry.mail.form + mass.mail + +
+

Are you sure?

+
+ +
+
+
+
+ + + + mass.resend.mail.form + mass.mail + +
+

Are you sure?

+
+ +
+
+
+
+ + + + mass.cancel.mail.form + mass.mail + +
+

Are you sure?

+
+ +
+
+
+
+ + +
+
\ No newline at end of file