diff options
| author | Thibault Delavallée <tde@odoo.com> | 2021-03-19 13:24:26 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2021-03-19 16:36:23 +0000 |
| commit | 73d09268922a7d242af85e36a3d81ed25ab4ca33 (patch) | |
| tree | 9c95b632128970e7cf8baf7c50cd3a42ab7d2058 /addons/event/tests | |
| parent | 1a66d9cb57dc17b697b7a56effa91de3a4b50bd7 (diff) | |
[FIX] event: allow event user to confirm registrations even with mail schedulers
Due to ACLs it is currently impossible for event users to confirm a draft
registration if schedulers are involved. Indeed it implies updating the
scheduler which is not do-able for them.
In this commit we sudo the update of schedulers, as this is a technical
object and access is granted through registrations.
Related to Task ID-2414658
COM PR odoo/odoo#68158
Diffstat (limited to 'addons/event/tests')
| -rw-r--r-- | addons/event/tests/test_event_mail_schedule.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/event/tests/test_event_mail_schedule.py b/addons/event/tests/test_event_mail_schedule.py index c7c61ee56c1..7ec60492b24 100644 --- a/addons/event/tests/test_event_mail_schedule.py +++ b/addons/event/tests/test_event_mail_schedule.py @@ -205,8 +205,7 @@ class TestMailSchedule(TestEventCommon, MockEmail): # NOTE: currently all schedulers are based on date_open which equals create_date # meaning several communications may be sent in the time time with freeze_time(now_start + relativedelta(hours=1)), self.mock_mail_gateway(): - # FIXME: sudo should not be necessary - reg3.sudo().action_confirm() + reg3.action_confirm() # verify that subscription scheduler was auto-executed after new registration confirmed self.assertEqual(len(after_sub_scheduler.mail_registration_ids), 3, 'event: should have 3 scheduled communication (1 / registration)') |
