oca-ocb-mail/odoo-bringout-oca-ocb-event_sms/event_sms/models/event_mail_registration.py
Ernad Husremovic daa394e8b0 19.0 vanilla
2026-03-09 09:31:39 +01:00

15 lines
513 B
Python

from odoo import fields, models
class EventMailRegistration(models.Model):
_inherit = 'event.mail.registration'
def _execute_on_registrations(self):
todo = self.filtered(
lambda r: r.scheduler_id.notification_type == "sms"
)
for scheduler, reg_mails in todo.grouped('scheduler_id').items():
scheduler._send_sms(reg_mails.registration_id)
todo.mail_sent = True
return super(EventMailRegistration, self - todo)._execute_on_registrations()