From 1f93c75c37fbbc884d4eb42ced29b32528beef20 Mon Sep 17 00:00:00 2001 From: Fekete Mihai Date: Sun, 24 Jan 2016 23:34:00 -0800 Subject: [PATCH] Add ondelete option to parent_id, runbot fails to lack of attribute. --- partner_contact_department/models/res_partner.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/partner_contact_department/models/res_partner.py b/partner_contact_department/models/res_partner.py index 20e2cfd27..0bf3eb793 100644 --- a/partner_contact_department/models/res_partner.py +++ b/partner_contact_department/models/res_partner.py @@ -28,7 +28,8 @@ class ResPartnerDepartment(models.Model): name = fields.Char(required=True, translate=True) parent_id = fields.Many2one( "res.partner.department", - "Parent department") + "Parent department", + ondelete='cascade') child_ids = fields.One2many( "res.partner.department", "parent_id",