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] crm_partner_company_group: show company_group_id on list and form view #1949

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

CRogos
Copy link

@CRogos CRogos commented Jan 3, 2025

No description provided.

@CRogos CRogos force-pushed the 17.0-imp-crm_partner_company_group branch from 3771189 to 2f92641 Compare January 3, 2025 09:41
Copy link

@MohamedOsman7 MohamedOsman7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in runboat, LGTM

@CRogos
Copy link
Author

CRogos commented Feb 6, 2025

@nguyenminhchien would you be so kind and do the second review of this improvement?

>
<field
name="company_group_id"
readonly="1"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
readonly="1"

It's readonly by default of related field

>
<field
name="company_group_id"
readonly="1"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
readonly="1"

@CRogos CRogos force-pushed the 17.0-imp-crm_partner_company_group branch from 2f92641 to 560d48c Compare February 7, 2025 08:12
@CRogos CRogos force-pushed the 17.0-imp-crm_partner_company_group branch from 560d48c to f74e679 Compare February 7, 2025 08:18
Copy link

@nguyenminhchien nguyenminhchien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@CRogos
Copy link
Author

CRogos commented Feb 8, 2025

@pedrobaeza I think this is ready for merge. Thank you.

@pedrobaeza pedrobaeza added this to the 17.0 milestone Feb 8, 2025
expr="//group[@name='opportunity_partner']/field[@name='partner_id']"
position="after"
>
<field name="company_group_id" invisible="not company_group_id" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not letting to assign it if not set?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The field is readonly and copied from the res.partner to crm.lead.

class CrmLead(models.Model):
    _inherit = "crm.lead"

    company_group_id = fields.Many2one(
        related="partner_id.company_group_id", store=True
    )

I agree that there a some interfaces, where you can change res.partner informations in the lead interface, but this is often not understood correctly by the users and they think they change something on this one lead, but they are actually change it on the linked contact for all leads.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, understood. Yes, it's OK this way then.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 17.0-ocabot-merge-pr-1949-by-pedrobaeza-bump-minor, awaiting test results.

@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 405873c. Thanks a lot for contributing to OCA. ❤️

@OCA-git-bot OCA-git-bot merged commit f18161c into OCA:17.0 Feb 8, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants