diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 5f2d83c5035..576f9d9e551 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -1834,5 +1834,5 @@ class MailComposeMessage(models.TransientModel): invoice = self.env['account.invoice'].browse(context['default_res_id']) if not invoice.sent: invoice.sent = True - self = self.with_context(mail_post_autofollow=True) + self = self.with_context(mail_post_autofollow=True, lang=invoice.partner_id.lang) return super(MailComposeMessage, self).send_mail(auto_commit=auto_commit) diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py index 53eeaffa2e3..8962513fd02 100644 --- a/addons/purchase/models/purchase.py +++ b/addons/purchase/models/purchase.py @@ -1131,6 +1131,7 @@ class MailComposeMessage(models.TransientModel): @api.multi def send_mail(self, auto_commit=False): if self._context.get('default_model') == 'purchase.order' and self._context.get('default_res_id'): - self = self.with_context(mail_post_autofollow=True) + order = self.env['purchase.order'].browse(self._context['default_res_id']) + self = self.with_context(mail_post_autofollow=True, lang=order.partner_id.lang) self.mail_purchase_order_on_send() return super(MailComposeMessage, self).send_mail(auto_commit=auto_commit) diff --git a/addons/sale/wizard/mail_compose_message.py b/addons/sale/wizard/mail_compose_message.py index 9ec46b48308..0291d3f848c 100644 --- a/addons/sale/wizard/mail_compose_message.py +++ b/addons/sale/wizard/mail_compose_message.py @@ -13,5 +13,5 @@ class MailComposeMessage(models.TransientModel): order = self.env['sale.order'].browse([self._context['default_res_id']]) if order.state == 'draft': order.with_context(tracking_disable=True).state = 'sent' - self = self.with_context(mail_post_autofollow=True) + self = self.with_context(mail_post_autofollow=True, lang=order.partner_id.lang) return super(MailComposeMessage, self).send_mail(auto_commit=auto_commit)