[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
This commit is contained in:
Remy Voet
2019-09-20 13:44:09 +00:00
committed by Thibault Delavallée
parent 7087e969ca
commit 428da3d539
+1 -1
View File
@@ -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)