[FIX]Add ondelete casacde to alias_model_id for mail_alias, otherwise impossible...
authordle@openerp.com <>
Thu, 10 Jan 2013 17:09:06 +0000 (18:09 +0100)
committerdle@openerp.com <>
Thu, 10 Jan 2013 17:09:06 +0000 (18:09 +0100)
bzr revid: dle@openerp.com-20130110170906-mw0u5d92rv4j2f88

addons/mail/mail_alias.py

index ef204d7..d9c49d8 100644 (file)
@@ -66,7 +66,7 @@ class mail_alias(osv.Model):
         'alias_name': fields.char('Alias', required=True,
                             help="The name of the email alias, e.g. 'jobs' "
                                  "if you want to catch emails for <jobs@example.my.openerp.com>",),
-        'alias_model_id': fields.many2one('ir.model', 'Aliased Model', required=True,
+        'alias_model_id': fields.many2one('ir.model', 'Aliased Model', required=True, ondelete="cascade",
                                           help="The model (OpenERP Document Kind) to which this alias "
                                                "corresponds. Any incoming email that does not reply to an "
                                                "existing record will cause the creation of a new record "