From 6eaf5da98acb7ac9d28caafdaa09804ed8e25ff7 Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Thu, 19 Sep 2019 12:43:30 +0000 Subject: [PATCH] [FIX] sms: avoid error when resending sms avoid a traceback when resending a SMS It was because arguments of the js function setSmsStatus were undefined in this case closes odoo/odoo#36907 Task-id: 2070836 Signed-off-by: Pierre Rousseau (pro) --- addons/sms/static/src/js/message.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/sms/static/src/js/message.js b/addons/sms/static/src/js/message.js index b5463ae9f8f..27ab85b0d21 100644 --- a/addons/sms/static/src/js/message.js +++ b/addons/sms/static/src/js/message.js @@ -59,7 +59,9 @@ Message.include({ var sms = _.find(self._smsIds, function (sms) { return sms[0] === smsID; }); - sms[2] = smsStatus; + if (sms !== undefined && smsStatus !== undefined) { + sms[2] = smsStatus; + } }, //--------------------------------------------------------------------------