diff options
| author | Thibault Delavallée <tde@odoo.com> | 2019-08-08 16:22:09 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-08-09 11:49:33 +0000 |
| commit | 2f75534244c8381e7b0a9a90224811c3e5ece72e (patch) | |
| tree | b87ccb91bcb51445c881f51481af57b75514a4a7 /addons/mass_mailing/wizard | |
| parent | 98385da4497f79f10969e179e148f761cc5d06a4 (diff) | |
[FIX] mass_mailing: allow to delete recently scheduled mailings
Scheduling a mailing creates a wizard with a m2o linking the mailing. While
this wizard is still alive and not garbage collected it is impossible to
delete the mailing. This commit fixes that.
LINKS
Task 1997464
Diffstat (limited to 'addons/mass_mailing/wizard')
| -rw-r--r-- | addons/mass_mailing/wizard/mailing_mailing_schedule_date.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mass_mailing/wizard/mailing_mailing_schedule_date.py b/addons/mass_mailing/wizard/mailing_mailing_schedule_date.py index 1d239c51022..e606351f222 100644 --- a/addons/mass_mailing/wizard/mailing_mailing_schedule_date.py +++ b/addons/mass_mailing/wizard/mailing_mailing_schedule_date.py @@ -10,7 +10,7 @@ class MailingMailingScheduleDate(models.TransientModel): _description = 'Mass Mailing Scheduling' schedule_date = fields.Datetime(string='Schedule in the Future') - mass_mailing_id = fields.Many2one('mailing.mailing', required=True) + mass_mailing_id = fields.Many2one('mailing.mailing', required=True, ondelete='cascade') @api.constrains('schedule_date') def _check_schedule_date(self): |
