diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index d6c4474ac3e..e91f0132728 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -116,10 +116,10 @@ class MailComposer(models.TransientModel): 'res.partner', 'Author', help="Author of the message. If not set, email_from may hold an email address that did not match any partner.") # composition - composition_mode = fields.Selection(selection=[ - ('comment', 'Post on a document'), - ('mass_mail', 'Email Mass Mailing'), - ('mass_post', 'Post on Multiple Documents')], string='Composition mode', default='comment') + composition_mode = fields.Selection( + selection=[('comment', 'Post on a document'), + ('mass_mail', 'Email Mass Mailing')], + string='Composition mode', default='comment') model = fields.Char('Related Document Model') res_id = fields.Integer('Related Document ID') record_name = fields.Char('Message Record Name') @@ -136,7 +136,6 @@ class MailComposer(models.TransientModel): subtype_id = fields.Many2one( 'mail.message.subtype', 'Subtype', ondelete='set null', default=lambda self: self.env['ir.model.data']._xmlid_to_res_id('mail.mt_comment')) - notify = fields.Boolean('Notify followers', help='Notify followers of the document (mass post only)') mail_activity_type_id = fields.Many2one('mail.activity.type', 'Mail Activity Type', ondelete='set null') # destination reply_to = fields.Char('Reply To', help='Reply email address. Setting the reply_to bypasses the automatic thread creation.') @@ -358,7 +357,7 @@ class MailComposer(models.TransientModel): for wizard in self: # Mass Mailing - mass_mode = wizard.composition_mode in ('mass_mail', 'mass_post') + mass_mode = wizard.composition_mode == 'mass_mail' # wizard works in batch mode: [res_id] or active_ids or active_domain if mass_mode and wizard.use_active_domain and wizard.model: @@ -387,7 +386,7 @@ class MailComposer(models.TransientModel): self.ensure_one() post_values_all = self._prepare_mail_values(res_ids) ActiveModel = self.env[self.model] if self.model and hasattr(self.env[self.model], 'message_post') else self.env['mail.thread'] - if self.composition_mode == 'mass_post': + if len(res_ids) > 1: # do not send emails directly but use the queue instead # add context key to avoid subscribing the author ActiveModel = ActiveModel.with_context( @@ -546,7 +545,7 @@ class MailComposer(models.TransientModel): if email_mode: subtype_id = False - elif self.is_log or (self.composition_mode == 'mass_post' and not self.notify): # log a note: subtype is False + elif self.is_log: # log a note: subtype is False subtype_id = False elif self.subtype_id: subtype_id = self.subtype_id.id diff --git a/addons/mail/wizard/mail_compose_message_views.xml b/addons/mail/wizard/mail_compose_message_views.xml index 54b37deca7a..8f7acb29202 100644 --- a/addons/mail/wizard/mail_compose_message_views.xml +++ b/addons/mail/wizard/mail_compose_message_views.xml @@ -33,9 +33,6 @@ context="{'force_email':True, 'show_email':True}"/> - -
diff --git a/addons/mass_mailing/wizard/mail_compose_message_views.xml b/addons/mass_mailing/wizard/mail_compose_message_views.xml index 9b8bcf95be5..51999b12232 100644 --- a/addons/mass_mailing/wizard/mail_compose_message_views.xml +++ b/addons/mass_mailing/wizard/mail_compose_message_views.xml @@ -7,7 +7,7 @@ mail.compose.message - +