Browse Source

Add ondelete option to parent_id, runbot fails to lack of attribute.

pull/327/head
Fekete Mihai 9 years ago
committed by Pedro M. Baeza
parent
commit
1f93c75c37
  1. 3
      partner_contact_department/models/res_partner.py

3
partner_contact_department/models/res_partner.py

@ -28,7 +28,8 @@ class ResPartnerDepartment(models.Model):
name = fields.Char(required=True, translate=True) name = fields.Char(required=True, translate=True)
parent_id = fields.Many2one( parent_id = fields.Many2one(
"res.partner.department", "res.partner.department",
"Parent department")
"Parent department",
ondelete='cascade')
child_ids = fields.One2many( child_ids = fields.One2many(
"res.partner.department", "res.partner.department",
"parent_id", "parent_id",

Loading…
Cancel
Save