diff options
| author | Thibault Delavallée <tde@odoo.com> | 2016-09-30 12:06:27 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2016-09-30 12:37:02 +0200 |
| commit | 00aab045b0e0b769cea6e0a152a30a33de64e2ca (patch) | |
| tree | d85d0a7ede9911a59e35b4825e7f8ecb80de8be7 /addons | |
| parent | b2b85fbb19ba681b64f50d3e503d1297191a57cf (diff) | |
[FIX] sale: fix context update wrongly migrated / updated at 94716a3f14d929574c46ef165e4364d12a5903ed
Purpose of the code is to automatically add the recipients of quotation emails
as followers. It is done using the mail_post_autofollow context key. However
current code add the context key in all cases and not just when composing
a message on sale order.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/sale/sale.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 0fb533a8254..29b12b5f111 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -810,7 +810,8 @@ class MailComposeMessage(models.TransientModel): order = self.env['sale.order'].browse([self._context['default_res_id']]) if order.state == 'draft': order.state = 'sent' - return super(MailComposeMessage, self.with_context(mail_post_autofollow=True)).send_mail(auto_commit=auto_commit) + self = self.with_context(mail_post_autofollow=True) + return super(MailComposeMessage, self).send_mail(auto_commit=auto_commit) class AccountInvoice(models.Model): |
