diff options
| author | Goffin Simon <sig@odoo.com> | 2020-11-04 15:02:17 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2020-11-05 12:40:47 +0000 |
| commit | 651da2fe8694ed0003a9dd0801c71f2ef26cedb9 (patch) | |
| tree | 20fb032f1135a95cd90d7d01fa5261e2204072d8 /addons | |
| parent | a4c737eb1d45610f6ab70268d5134dc5ed00ba8d (diff) | |
[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#61341
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mail/models/mail_notification.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/models/mail_notification.py b/addons/mail/models/mail_notification.py index 3a67e565a7a..44f03184f0d 100644 --- a/addons/mail/models/mail_notification.py +++ b/addons/mail/models/mail_notification.py @@ -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] |
