diff --git a/partner_sector/__openerp__.py b/partner_sector/__openerp__.py index 27eec15a6..8080fa708 100644 --- a/partner_sector/__openerp__.py +++ b/partner_sector/__openerp__.py @@ -6,7 +6,7 @@ { "name": "Partner Sector", "summary": "Add partner sectors", - "version": "9.0.1.0.1", + "version": "9.0.1.0.2", "category": "Customer Relationship Management", "website": "http://www.tecnativa.com", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/partner_sector/models/res_partner_sector.py b/partner_sector/models/res_partner_sector.py index bf34c0637..8570bd238 100644 --- a/partner_sector/models/res_partner_sector.py +++ b/partner_sector/models/res_partner_sector.py @@ -15,7 +15,8 @@ class ResPartnerSector(models.Model): _description = "Sector" name = fields.Char(required=True, translate=True) - parent_id = fields.Many2one(comodel_name='res.partner.sector', + parent_id = fields.Many2one(string='Parent', + comodel_name='res.partner.sector', ondelete='restrict') child_ids = fields.One2many(comodel_name='res.partner.sector', inverse_name='parent_id',