Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][IMP] partner_company_group: Add one2many counterpart for company_gro… #1243

Merged
merged 1 commit into from
Mar 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[IMP] partner_company_group: Add one2many counterpart for company_gro…
…up_id

TT34815
carlosdauden authored and CarlosRoca13 committed Mar 23, 2022
commit 7e15c50628f5d0a03b5407923a1dc2db99932ba3
5 changes: 5 additions & 0 deletions partner_company_group/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -10,6 +10,11 @@ class Contact(models.Model):
company_group_id = fields.Many2one(
"res.partner", "Company group", domain=[("is_company", "=", True)]
)
company_group_member_ids = fields.One2many(
comodel_name="res.partner",
inverse_name="company_group_id",
string="Company group members",
)

def _commercial_fields(self):
return super()._commercial_fields() + ["company_group_id"]