Skip to content

[T-8373][17.0][IMP] partner_contact_show_ref: add option to show own ref instead of the parent one#45

Merged
Sygel-bot merged 1 commit into17.0from
17.0-T-8373
Jun 17, 2025
Merged

[T-8373][17.0][IMP] partner_contact_show_ref: add option to show own ref instead of the parent one#45
Sygel-bot merged 1 commit into17.0from
17.0-T-8373

Conversation

@Tisho99
Copy link
Copy Markdown
Contributor

@Tisho99 Tisho99 commented May 28, 2025

No description provided.

@Tisho99 Tisho99 changed the title [T-8373][IMP] partner_contact_show_ref: add option to show own ref instead of the parent one [T-8373][17.0][IMP] partner_contact_show_ref: add option to show own ref instead of the parent one May 28, 2025
@Tisho99 Tisho99 force-pushed the 17.0-T-8373 branch 2 times, most recently from b49f7b3 to accfb18 Compare May 28, 2025 12:02
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
partner_contact_show_ref/models/res_partner.py 100.00% <100.00%> (ø)
...ct_show_ref/tests/test_partner_contact_show_ref.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@Jaimermaccione Jaimermaccione left a comment

Choose a reason for hiding this comment

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

@Tisho99 Hi Alberto,

I'm currently reviewing the module from a functional perspective. Would it be possible to also display the reference when viewing the subcontacts under the parent contact?

image

The point is, sometimes the parent is reviewed to look into a specific member (subcontact), especially since they also have the OCA module that allows opening the contact directly from that view.

Let me know. Thanks!

@Tisho99
Copy link
Copy Markdown
Contributor Author

Tisho99 commented May 28, 2025

@Jaimermaccione It's possible, but that is a different customization. This module edits the display_name field, a computed field that is shown by the system in some places, however what is shown there is the normal name, another field

If it's important, I recommend you to talk with Manu and define what to do, probably editing the custom

Copy link
Copy Markdown

@Jaimermaccione Jaimermaccione left a comment

Choose a reason for hiding this comment

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

@Tisho99 Understood, Alberto! From my side, the module is working well — functional review done in the local environment. LGTM!

Comment thread partner_contact_show_ref/tests/test_partner_contact_show_ref.py
Comment thread partner_contact_show_ref/README.rst Outdated

* ...

#. Go to a partner form of type company #. In the "Sales and Purchase"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is not properly formatted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@manuelregidor Changed

@Jaimermaccione
Copy link
Copy Markdown

@Tisho99 Alberto,

Sorry I didn’t catch this earlier — I was running some tests and noticed that the modified references aren’t showing up in the list view. They do appear fine in the kanban view though.
image

image

Could you take a look?

Thanks!

@Tisho99
Copy link
Copy Markdown
Contributor Author

Tisho99 commented Jun 12, 2025

@Jaimermaccione

This case is the same as the children's kanban.

The displayed field set by odoo is the name, not the computed one im editing in this module

I can edit it in the custom to:

  1. display the computed name
  2. Add the reference column before the name

I am going to edit the custom MR with the option 1. Tell me if it is correct

@Jaimermaccione
Copy link
Copy Markdown

@Tisho99 Perfect, Alberto. Functionally reviewed in the custom MR and everything looks good.

Thanks!

Copy link
Copy Markdown
Contributor

@manuelregidor manuelregidor left a comment

Choose a reason for hiding this comment

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

Technical review. LGTM

@Sygel-bot
Copy link
Copy Markdown
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). 🤖

@Tisho99
Copy link
Copy Markdown
Contributor Author

Tisho99 commented Jun 13, 2025

@ValentinVinagre Can you review?

Copy link
Copy Markdown

@ValentinVinagre ValentinVinagre left a comment

Choose a reason for hiding this comment

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

Blocked.
Please add a before and after photo of this change.
Has interaction with this module been considered?
https://github.com/OCA/partner-contact/tree/17.0/partner_firstname


own_ref_in_name = fields.Boolean()

def _get_complete_name(self):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

shouldn't there be a depends on the new field?

class Partner(models.Model):
_inherit = "res.partner"

own_ref_in_name = fields.Boolean()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why by partner? Wouldn't this be a company or global configuration in the system?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Jaimermaccione

Do you know if the client requires all contacts to have their own contact ref in their name? Or do some have to have their parent's ref?

Basically, based on reading the description, I understand they must have their own ID. Do you know why the client specified which ref to display at the contact level?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Tisho99 The client only requires individual contact references for those contacts that are delivery addresses acting as cooperative members. For all other cases, the standard behavior should apply — meaning the contact should inherit the parent’s reference.

Does that help clarify?

@Tisho99
Copy link
Copy Markdown
Contributor Author

Tisho99 commented Jun 16, 2025

@ValentinVinagre

The interaction with the partner_firstname hadn't been considered. However, I have reviewed the module and they are compatible because they edit distinct fields, and both does the inheritance correctly

Can we continue with the task?

@Tisho99
Copy link
Copy Markdown
Contributor Author

Tisho99 commented Jun 16, 2025

Before:
image

After:
image

@ValentinVinagre
Copy link
Copy Markdown

@ValentinVinagre

The interaction with the partner_firstname hadn't been considered. However, I have reviewed the module and they are compatible because they edit distinct fields, and both does the inheritance correctly

Can we continue with the task?

Of course, he has already paid his toll 😸

@ValentinVinagre
Copy link
Copy Markdown

/sygelbot merge minor

@Sygel-bot
Copy link
Copy Markdown
Contributor

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

@Sygel-bot Sygel-bot merged commit d3d5ad6 into 17.0 Jun 17, 2025
5 checks passed
@Sygel-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 224df62. Thanks a lot for contributing to sygel-technology. ❤️

@Sygel-bot Sygel-bot deleted the 17.0-T-8373 branch June 17, 2025 06:12
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