Commit Graph
6 Commits
Author SHA1 Message Date
Julien Castiaux 193fee519c [FIX] calendar: missing cron compat fom sms_calendar
Fine tunning of c8f031ad77, this commit has the missing code
compatibility for sms_calendar.

closes odoo/odoo#65064

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-29 15:38:24 +00:00
Julien Castiaux c8f031ad77 [IMP] calendar: schedule reminders using triggers
The calendar reminders are emails or web notifications sent moments
before an event start. The mechanism to send web notifications is
controlled by the browser, it fetches all the future notifications and
uses `setTimeout()` to delay them. The mechanism to send emails was
controlled by a cron, every 30 minutes the cron would look for the
coming events and send the mail reminder.

The cron was running every 30 minutes even if there was no event. The
best precision was 30 minutes.

The new mechanism use cron triggers, every time one add email reminders,
triggers are created to call the cron at the precise moment the alarm is
set. The cron no longer send emails for events in the coming 30 minutes
as those will be triggered too.

closes odoo/odoo#64560

Task: 2416741
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-01-18 15:57:41 +00:00
Julien Castiaux cbf00ae8ee [REF] calendar: remove cron activation code
There is code that automatically enable or disable the cron whether it
exists alarms. As alarms are automatically added, the cron is actually
always enabled.
2021-01-15 18:58:12 +00:00
Thibault Delavallée 1c79c5ee30 [REF] ir_cron: make scheduled actions inherits from server actions
The purpose of this commit is to handle code execution only in server
action and delegate schedule management to ir_cron model.

ir.cron model now inherits from ir.actions.server. Fields model, function
and args are removed as well as the logic to handle them. There is no
more code manipulation and evaluation in ir_cron, only a call to the run
method of ir.actions.server.

Cron form view use server action form view as primary view. This way
automated actions use the same base form as server actions with
cron details added.

Thanks to @fpodoo for the original idea and preliminary work. Thanks to
@jpr-odoo for first developments. Thanks to @jem-odoo for reviewing.
2017-01-03 19:11:07 +01:00
Jérome Maes 6bc14c9142 [MIG] calendar: migration to new API
Migration of all python code, mostly withtout chagnes. And adapting
xml files to guidelines.

On calendar.py, some changes have been perform to make the migration works :
- `_compute` method has been split into `_compute_dates`, `_compute_attendee` and `_compute_display_time`.
- remove unused method `onchange_partner_ids`, `check_partners_email`
- make `compute_rule_string` use a cache record instead of a value
dict to avoid crashes
- remove `new_invitation_token` method, and make it a default value on attendee creation
- add a default value on `day` field, otherwise the "Please select a
proper day of the month" exception is raised during the onchange
2016-07-14 14:04:33 +02:00
Jérome Maes b535461e47 [MOV] calendar: reoganize module directory 2016-07-14 14:04:33 +02:00