Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions addons/sale/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down