Change member.area_id to area_id.root_id

This commit is contained in:
Youssef Elouahby 2018-10-12 16:05:01 +01:00
parent 03819f5f3c
commit 71f7299aaf

View File

@ -40,7 +40,7 @@ class GolemMember(models.Model):
area_ids = self.env['golem.partner.area'].search([])
if member.area_id:
applicable_areas += area_ids.filtered(
lambda r: r == member.area_id
lambda r: r == member.area_id.root_id
)
if not applicable_areas and area_ids:
applicable_areas += area_ids[0]