diff options
| author | Thibault Delavallée <tde@odoo.com> | 2018-03-27 13:42:18 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2018-03-27 14:59:51 +0200 |
| commit | 1905b8a5d5b071076dfb7d71dc30f5c36b5d601b (patch) | |
| tree | 09fbad1400db784dade82c05d0cfa61ed3d912a0 /addons/mail/controllers | |
| parent | 60e5a887c55c88dd3f5524073757a804c6dbee77 (diff) | |
[IMP] mail: take first found reminder activity type as default when creating reminders
If people define several reminders, take first found one based on sequence
as default activity type when creating reminders. This commit is linked to
the recent merge of reminders done at f488dc58c37fdc7fd49df759165de641e213444b.
Diffstat (limited to 'addons/mail/controllers')
| -rw-r--r-- | addons/mail/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/controllers/main.py b/addons/mail/controllers/main.py index 9682cbe1125..3445691f601 100644 --- a/addons/mail/controllers/main.py +++ b/addons/mail/controllers/main.py @@ -237,7 +237,7 @@ class MailController(http.Controller): if date_deadline: values['date_deadline'] = date_deadline if not activity_type_id: - activity_type_id = request.env['mail.activity.type'].sudo().search([('category', '=', 'reminder')]).id + activity_type_id = request.env['mail.activity.type'].sudo().search([('category', '=', 'reminder')], limit=1).id if activity_type_id: values['activity_type_id'] = activity_type_id activity = request.env['mail.activity'].create(values) |
