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

[17.0][IMP] base_partner_company_group: restrict choosing active partner itself on the form #1845

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion base_partner_company_group/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class Contact(models.Model):

company_group_id = fields.Many2one(
"res.partner",
domain=[("is_company", "=", True)],
recursive=True,
)
company_group_member_ids = fields.One2many(
Expand Down
1 change: 1 addition & 0 deletions base_partner_company_group/views/contact_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<xpath expr="//div[hasclass('o_address_format')]" position="after">
<field
name="company_group_id"
domain="[('is_company', '=', True), ('id', '!=', commercial_partner_id)]"
widget="res_partner_many2one"
invisible="not is_company"
/>
Expand Down
Loading