From 428da3d539eb3dd77b0e1c20d86c283194ef0917 Mon Sep 17 00:00:00 2001 From: Remy Voet Date: Fri, 20 Sep 2019 13:03:51 +0000 Subject: [PATCH] [FIX] sms: number is actually not really required sms, in the form view of sms composer (mass composition) : we got a blocking message when we validate the composer sms with records which doesn't have a phone number. However we generally explicitly handle void numbers: in composer in comment mode there is an User Error, and mass mode has specific error code to put on sms records telling number is void (and sms is in error, meaning it will not) be sent. As sms record is required notably for mass mailing traces and marketing automation traces we have to keep sms records with void numbers. We therefore remove the required attribute on sms record. Task ID 2073016 (sms fixes) PR #37185 --- addons/sms/models/sms_sms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sms/models/sms_sms.py b/addons/sms/models/sms_sms.py index 8bf9c8c2924..256bebf7eda 100644 --- a/addons/sms/models/sms_sms.py +++ b/addons/sms/models/sms_sms.py @@ -22,7 +22,7 @@ class SmsSms(models.Model): 'server_error': 'sms_server' } - number = fields.Char('Number', required=True) + number = fields.Char('Number') body = fields.Text() partner_id = fields.Many2one('res.partner', 'Customer') mail_message_id = fields.Many2one('mail.message', index=True)