[FIX] event[_sms]: send emails direclty after attendee confirmation
Steps to reproduce:
- Install `Events` module
- Create a new event and set it to `Autoconfirmation`
- Create a new attendee and confirm it
Issue:
Mail that confirm registration is not sent to attendee.
Cause:
When computing the `schedule_date`, it take the value of the
`registration_id.create_date` WITH the microseconds.
When creating a new attendee, at some point we run the mail schdelure
that compare if the `schedule_date <= now`.
`schedule_date` and `now` have same value except for the microseconds
(set on `schedule_date` but not on `now`).
Therefore `schedule_date > now` and the mail is not sent.
Solution:
Remove microseconds from the schedule_date.
opw-3079389
closes odoo/odoo#122137
X-original-commit: f2adca45dcec5a11daa92d07bae00615210ea0de
Signed-off-by:
Nasreddin Boulif (bon) <bon@odoo.com>
Showing
- addons/event/models/event_mail.py 2 additions, 2 deletionsaddons/event/models/event_mail.py
- addons/event/tests/test_event_mail_schedule.py 12 additions, 9 deletionsaddons/event/tests/test_event_mail_schedule.py
- addons/event_sms/tests/test_sms_schedule.py 1 addition, 1 deletionaddons/event_sms/tests/test_sms_schedule.py
Loading
Please register or sign in to comment