diff options
| author | Aurélien Warnon <awa@odoo.com> | 2019-11-06 12:57:40 +0000 |
|---|---|---|
| committer | Aurélien Warnon <awa@odoo.com> | 2019-12-12 06:24:35 +0000 |
| commit | 0d6ddb7bda7b486d39dc00ec012d54c411fe6751 (patch) | |
| tree | bf91896089dffb992b6bc2735dc02cfc6ae510bc /addons/event_sms/models | |
| parent | c8e862249eba4b5f6cc9c3ac89167aec494c44f4 (diff) | |
[FIX] event[_sms]: correctly take parameters from event type mail
PURPOSE
This commit 62ac23f0b93f05125f5067139898d81ede567130 introduced SMS capabilities on for
event.type.mail and event.mail models.
Values of event_type_mail_ids on event.type are supposed to be copied to
event_mail_ids on event.event when changing the event_type_id of an event.
There are however 2 issues with that integration:
- The 'notification_type' field was not correctly set on default
event_type_mail_ids on event.type;
- The 'notification_type' and 'sms_template' fields were not copied from
event_type_mail_ids to event_mail_ids;
LINKS
PR #39892
Task ID 2115792
closes odoo/odoo#41736
X-original-commit: 3fd66d844aa66ca8d54223071c787974e6c88c94
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/event_sms/models')
| -rw-r--r-- | addons/event_sms/models/event_mail.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/event_sms/models/event_mail.py b/addons/event_sms/models/event_mail.py index 0b692bca8fd..14d43ec1373 100644 --- a/addons/event_sms/models/event_mail.py +++ b/addons/event_sms/models/event_mail.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo import fields, models +from odoo import api, fields, models class EventTypeMail(models.Model): @@ -13,6 +13,10 @@ class EventTypeMail(models.Model): domain=[('model', '=', 'event.registration')], ondelete='restrict', help='This field contains the template of the SMS that will be automatically sent') + @api.model + def _get_event_mail_fields_whitelist(self): + return super(EventTypeMail, self)._get_event_mail_fields_whitelist() + ['sms_template_id'] + class EventMailScheduler(models.Model): _inherit = 'event.mail' |
