mirror of
https://github.com/bringout/oca-ocb-mail.git
synced 2026-04-23 16:22:05 +02:00
19.0 vanilla
This commit is contained in:
parent
5df8c07b59
commit
daa394e8b0
2114 changed files with 564841 additions and 299642 deletions
|
|
@ -0,0 +1,15 @@
|
|||
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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue