When we include the author in the recipients of the quotation email of a repair order he doesn't receive the email. Steps to reproduce the error : 1- create a repiar order 2- add the author in the list of recipients 3- send the email The origin of the problem is that mail_notify_author=False , se we need to add it as True when we have the author in the recipients. Similar old fix : https://github.com/odoo/odoo/commit/f49dbf595c870b682f36c11443c9cf1a9a027474 opw-3295744 closes odoo/odoo#126986 X-original-commit: d4d48526867e93295d93d4504e824cfdc2b146a7 Signed-off-by: William Henrotin (whe) <whe@odoo.com> Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
14 lines
499 B
Python
14 lines
499 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import models
|
|
|
|
|
|
class MailComposeMessage(models.TransientModel):
|
|
_inherit = 'mail.compose.message'
|
|
|
|
def _action_send_mail(self, auto_commit=False):
|
|
if self.model == 'repair.order':
|
|
self = self.with_context(mail_notify_author=self.env.user.partner_id in self.partner_ids)
|
|
return super(MailComposeMessage, self)._action_send_mail(auto_commit=auto_commit)
|