[FIX] website_sale: render mail template when sending only one mail
The email_compose_message_wizard_form takes a default_composition_mode. If it is 'mass_mail', the used mail template is not rendered. Since this is basically unreadable for a normal user, this can be confusing. Note that this is even the case if the mail is being sent on only one record. We use the 'comment' composition mode if there is only one target record so that the template is rendered in that case. opw 1984381 closes odoo/odoo#33173 Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
This commit is contained in:
@@ -350,7 +350,7 @@ class SaleOrder(models.Model):
|
||||
'view_id': composer_form_view_id,
|
||||
'target': 'new',
|
||||
'context': {
|
||||
'default_composition_mode': 'mass_mail',
|
||||
'default_composition_mode': 'mass_mail' if len(self.ids) > 1 else 'comment',
|
||||
'default_res_id': self.ids[0],
|
||||
'default_model': 'sale.order',
|
||||
'default_use_template': bool(template_id),
|
||||
|
||||
Reference in New Issue
Block a user