[FIX] mail: Sending a sms on an opportunity without customer
Steps to reproduce the bug: - Create an opportunity without a customer but with a phone number - Send a sms - Refesh the page Bug: A traceback was raised because an entry is created in mail_message_res_partner_needaction_rel with partner_id = False Due to https://github.com/odoo/odoo/blob/14.0/addons/sms/models/mail_thread.py#L327 A mail.notification is created from a sms even if there is no partner set on the sms opw:2372201 closes odoo/odoo#61425 X-original-commit: 651da2fe8694ed0003a9dd0801c71f2ef26cedb9 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -100,5 +100,5 @@ class MailNotification(models.Model):
|
||||
'notification_type': notif.notification_type,
|
||||
'notification_status': notif.notification_status,
|
||||
'failure_type': notif.failure_type,
|
||||
'res_partner_id': [notif.res_partner_id.id, notif.res_partner_id.display_name],
|
||||
'res_partner_id': [notif.res_partner_id.id, notif.res_partner_id.display_name] if notif.res_partner_id else False,
|
||||
} for notif in self]
|
||||
|
||||
Reference in New Issue
Block a user