Browse Source

fixup! [ADD] easy_my_coop: representative_of_member_company

pull/119/head
Manuel Claeys Bouuaert 4 years ago
parent
commit
cf5af4d414
  1. 3
      easy_my_coop/models/partner.py

3
easy_my_coop/models/partner.py

@ -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)]

Loading…
Cancel
Save