|
|
@ -205,11 +205,13 @@ class ResPartner(models.Model): |
|
|
|
member_companies = self.env["res.partner"].search( |
|
|
|
[("is_company", "=", True), ("member", "=", True)] |
|
|
|
) |
|
|
|
partner.representative_of_member_company = partner in member_companies.mapped( |
|
|
|
partner.representative_of_member_company = ( |
|
|
|
partner in member_companies.mapped( |
|
|
|
"child_ids" |
|
|
|
).filtered( |
|
|
|
"representative" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
@api.multi |
|
|
|
def has_representative(self): |
|
|
|