[FIX] calendar: update cron as SUPERUSER.

As regular employees are not allowed to
alter cron activities.

opw-639419
This commit is contained in:
Denis Ledoux 2015-05-19 11:03:47 +02:00
parent f66b7ee62a
commit bac5b87b73
1 changed files with 1 additions and 1 deletions

View File

@ -585,7 +585,7 @@ class calendar_alarm(osv.Model):
def _update_cron(self, cr, uid, context=None):
try:
cron = self.pool['ir.model.data'].get_object(
cr, uid, 'calendar', 'ir_cron_scheduler_alarm', context=context)
cr, SUPERUSER_ID, 'calendar', 'ir_cron_scheduler_alarm', context=context)
except ValueError:
return False
return cron.toggle(model=self._name, domain=[('type', '=', 'email')])