|
@ -174,6 +174,7 @@ class ResPartner(models.Model): |
|
|
representative = fields.Boolean(string="Legal Representative") |
|
|
representative = fields.Boolean(string="Legal Representative") |
|
|
representative_of_member_company = fields.Boolean( |
|
|
representative_of_member_company = fields.Boolean( |
|
|
string="Legal Representative of Member Company", |
|
|
string="Legal Representative of Member Company", |
|
|
|
|
|
store=True, |
|
|
compute="_compute_representative_of_member_company", |
|
|
compute="_compute_representative_of_member_company", |
|
|
) |
|
|
) |
|
|
subscription_request_ids = fields.One2many( |
|
|
subscription_request_ids = fields.One2many( |
|
@ -199,7 +200,7 @@ class ResPartner(models.Model): |
|
|
|
|
|
|
|
|
@api.multi |
|
|
@api.multi |
|
|
@api.depends("parent_id", "representative") |
|
|
@api.depends("parent_id", "representative") |
|
|
def _compute_fieldname(self): |
|
|
|
|
|
|
|
|
def _compute_representative_of_member_company(self): |
|
|
for partner in self: |
|
|
for partner in self: |
|
|
member_companies = self.env["res.partner"].search( |
|
|
member_companies = self.env["res.partner"].search( |
|
|
[("is_company", "=", True), ("member", "=", True)] |
|
|
[("is_company", "=", True), ("member", "=", True)] |
|
|