[FIX] mass_mailing: ondelete cascade on transient

The test wizard will be dropped eventually but it is not possible to delete
the mass-mailing before the transient is cleaned too due to the required field.
To make it faster, add a ondelete cascade on the field.

Closes #15217
This commit is contained in:
Adrien Peiffer (ACSONE) 2017-01-26 10:29:04 +01:00 committed by Martin Trigaux
parent 9d535ee2c7
commit 4232a08164
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,8 @@ class TestMassMailing(osv.TransientModel):
_columns = {
'email_to': fields.char('Recipients', required=True,
help='Comma-separated list of email addresses.'),
'mass_mailing_id': fields.many2one('mail.mass_mailing', 'Mailing', required=True),
'mass_mailing_id': fields.many2one(
'mail.mass_mailing', 'Mailing', required=True, ondelete='cascade'),
}
_defaults = {