[IMP] event_mail_manual:

use super function
This commit is contained in:
clementthomas
2024-03-06 12:21:18 +01:00
parent 0d58b2db0b
commit 143ac48a69

View File

@@ -10,12 +10,11 @@ class EventMail(models.Model):
notification_type = fields.Selection(selection_add=[('mail_manual', 'Mail (manual)')], ondelete={'mail_manual': 'set default'}) notification_type = fields.Selection(selection_add=[('mail_manual', 'Mail (manual)')], ondelete={'mail_manual': 'set default'})
def _selection_template_model_get_mapping(self): def _selection_template_model_get_mapping(self):
return { return {**super(EventMail, self)._selection_template_model_get_mapping(), 'mail_manual': 'mail.template'}
'mail': 'mail.template',
'mail_manual': 'mail.template'
}
@api.depends('event_id.date_begin', 'event_id.date_end', 'interval_type', 'interval_unit', 'interval_nbr','notification_type') @api.depends('event_id.date_begin', 'event_id.date_end', 'interval_type', 'interval_unit', 'interval_nbr','notification_type')
def _compute_scheduled_date(self): def _compute_scheduled_date(self):
res = super(EventMail, self)._compute_scheduled_date() res = super(EventMail, self)._compute_scheduled_date()
@@ -77,3 +76,5 @@ class EventMailRegistration(models.Model):
done.write({'mail_sent': True}) done.write({'mail_sent': True})
return res return res