summaryrefslogtreecommitdiff
path: root/addons/sms/wizard
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-04-17 09:53:05 +0000
committerSébastien Theys <seb@odoo.com>2020-04-17 12:17:57 +0000
commitdea52493b819939ae16391d8b19c2f404c7ec143 (patch)
treeda5729bab3ff9bc36825480f54c838b17fced580 /addons/sms/wizard
parent69b51ce05e855b2b95e75919ac97996a1ff5e136 (diff)
[IMP] mail, sms, snailmail, test_mail_full: adapt mail.notification
The purpose is to have more common code for failure and notifications, with less override in `sms` and `snailmail`. task-2176017 closes odoo/odoo#44170 Related: odoo/enterprise#9140 Related: odoo/upgrade#918 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/sms/wizard')
-rw-r--r--addons/sms/wizard/sms_cancel.py2
-rw-r--r--addons/sms/wizard/sms_resend.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/sms/wizard/sms_cancel.py b/addons/sms/wizard/sms_cancel.py
index 945b4d8d843..5120e94cc4f 100644
--- a/addons/sms/wizard/sms_cancel.py
+++ b/addons/sms/wizard/sms_cancel.py
@@ -34,5 +34,5 @@ WHERE notif.notification_type = 'sms' IS TRUE AND notif.notification_status IN (
if notif_ids:
self.env['mail.notification'].browse(notif_ids).sudo().write({'notification_status': 'canceled'})
if message_ids:
- self.env['mail.message'].browse(message_ids)._notify_sms_update()
+ self.env['mail.message'].browse(message_ids)._notify_message_notification_update()
return {'type': 'ir.actions.act_window_close'}
diff --git a/addons/sms/wizard/sms_resend.py b/addons/sms/wizard/sms_resend.py
index 4d747e38b63..3b40e1f2959 100644
--- a/addons/sms/wizard/sms_resend.py
+++ b/addons/sms/wizard/sms_resend.py
@@ -91,7 +91,7 @@ class SMSResend(models.TransientModel):
put_in_queue=False
)
- self.mail_message_id._notify_sms_update()
+ self.mail_message_id._notify_message_notification_update()
return {'type': 'ir.actions.act_window_close'}
def action_cancel(self):
@@ -99,7 +99,7 @@ class SMSResend(models.TransientModel):
sudo_self = self.sudo()
sudo_self.mapped('recipient_ids.notification_id').write({'notification_status': 'canceled'})
- self.mail_message_id._notify_sms_update()
+ self.mail_message_id._notify_message_notification_update()
return {'type': 'ir.actions.act_window_close'}
def action_buy_credits(self):