From 38aec855b8be6fd7a32603c4e4f45f77c1d811f5 Mon Sep 17 00:00:00 2001 From: sebalix Date: Wed, 4 Feb 2015 12:51:39 +0100 Subject: [PATCH] [IMP] Module 'auditlog' - Autoremove 'auditlog.log.line' records when a field is deleted (e.g. migration) --- auditlog/models/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auditlog/models/log.py b/auditlog/models/log.py index f693f8c25..32d8de36e 100644 --- a/auditlog/models/log.py +++ b/auditlog/models/log.py @@ -43,7 +43,7 @@ class auditlog_log_line(models.Model): _description = "Auditlog - Log details (fields updated)" field_id = fields.Many2one( - 'ir.model.fields', string=u"Field", required=True) + 'ir.model.fields', ondelete='cascade', string=u"Field", required=True) log_id = fields.Many2one( 'auditlog.log', string=u"Log", ondelete='cascade') old_value = fields.Text(u"Old Value")