-
-
Notifications
You must be signed in to change notification settings - Fork 871
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
[17.0][IMP] crm_partner_company_group: show company_group_id on list and form view #1949
Conversation
3771189
to
2f92641
Compare
There was a problem hiding this 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
@nguyenminhchien would you be so kind and do the second review of this improvement? |
> | ||
<field | ||
name="company_group_id" | ||
readonly="1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readonly="1" |
It's readonly by default of related field
> | ||
<field | ||
name="company_group_id" | ||
readonly="1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readonly="1" |
2f92641
to
560d48c
Compare
560d48c
to
f74e679
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This PR has the |
@pedrobaeza I think this is ready for merge. Thank you. |
expr="//group[@name='opportunity_partner']/field[@name='partner_id']" | ||
position="after" | ||
> | ||
<field name="company_group_id" invisible="not company_group_id" /> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ocabot merge minor
On my way to merge this fine PR! |
Congratulations, your PR was merged at 405873c. Thanks a lot for contributing to OCA. ❤️ |
No description provided.