From d2cc8c31c24d32bc74fa6b6de7d1fc0cb437f408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 26 Feb 2008 18:39:46 +0100 Subject: [PATCH] Add on delete cascade if view is deleted --- trytond/ir/action.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/trytond/ir/action.py b/trytond/ir/action.py index aaa1bf72b4..95ae31025a 100644 --- a/trytond/ir/action.py +++ b/trytond/ir/action.py @@ -268,12 +268,13 @@ class ActionActWindowView(OSV): _rec_name = 'view' _description = __doc__ sequence = fields.Integer('Sequence') - view = fields.Many2One('ir.ui.view', 'View', required=True) + view = fields.Many2One('ir.ui.view', 'View', required=True, + ondelete='CASCADE') act_window = fields.Many2One('ir.action.act_window', 'Action', - ondelete='CASCADE') + ondelete='CASCADE') multi = fields.Boolean('On multiple doc.', - help="If set to true, the action will not be displayed \n" \ - "on the right toolbar of a form views.") + help="If set to true, the action will not be displayed \n" \ + "on the right toolbar of a form views.") _order = 'sequence' def default_multi(self, cursor, user, context=None):