diff --git a/addons/sale/models/sale_order.py b/addons/sale/models/sale_order.py index e059a62e44112..8d2a63c089a01 100644 --- a/addons/sale/models/sale_order.py +++ b/addons/sale/models/sale_order.py @@ -1720,10 +1720,9 @@ def _track_finalize(self): def message_post(self, **kwargs): if self.env.context.get('mark_so_as_sent'): self.filtered(lambda o: o.state == 'draft').with_context(tracking_disable=True).write({'state': 'sent'}) - so_ctx = {'mail_post_autofollow': self.env.context.get('mail_post_autofollow', True)} if self.env.context.get('mark_so_as_sent') and 'mail_notify_author' not in kwargs: kwargs['notify_author'] = self.env.user.partner_id.id in (kwargs.get('partner_ids') or []) - return super(SaleOrder, self.with_context(**so_ctx)).message_post(**kwargs) + return super(SaleOrder, self).message_post(**kwargs) def _notify_get_recipients_groups(self, message, model_description, msg_vals=None): """ Give access button to users and portal customer as portal is integrated