From 34acd1751786e36db4850e3dfc88bdd4f0192948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sat, 25 Apr 2015 16:25:32 +0200 Subject: [PATCH] [FIX] mis_builder: missing cascade delete --- mis_builder/models/mis_builder.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mis_builder/models/mis_builder.py b/mis_builder/models/mis_builder.py index 7e8564fb..835ea7bc 100644 --- a/mis_builder/models/mis_builder.py +++ b/mis_builder/models/mis_builder.py @@ -266,7 +266,8 @@ class mis_report_query(orm.Model): domain=[('ttype', 'in', ('date', 'datetime'))]), 'domain': fields.char(string='Domain'), - 'report_id': fields.many2one('mis.report', string='Report'), + 'report_id': fields.many2one('mis.report', string='Report', + ondelete='cascade'), } _order = 'name' @@ -445,7 +446,8 @@ class mis_report_instance_period(orm.Model): multi="dates", string="To period"), 'sequence': fields.integer(string='Sequence'), 'report_instance_id': fields.many2one('mis.report.instance', - string='Report Instance'), + string='Report Instance', + ondelete='cascade'), 'comparison_column_ids': fields.many2many( 'mis.report.instance.period', 'mis_report_instance_period_rel',