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

[16.0][MIG] partner_ref_unique: Migration to 16.0 #1495

Merged
merged 27 commits into from
May 26, 2023

Conversation

diogocsc
Copy link
Contributor

No description provided.

antespi and others added 26 commits March 31, 2023 16:04
This contraint is self-disabled when it detects by context that it is being used from the contact deduplicator.

Otherwise, the user cannot deduplicate a contact selecting the "good" one as the one without reference.

Anyway, in these cases, the check has no meaning, since it is to avoid duplicates and in this context we are currently removing them.
OCA Transbot updated translations from Transifex

OCA Transbot updated translations from Transifex

OCA Transbot updated translations from Transifex

OCA Transbot updated translations from Transifex

OCA Transbot updated translations from Transifex
Currently translated at 100.0% (8 of 8 strings)

Translation: partner-contact-12.0/partner-contact-12.0-partner_ref_unique
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-partner_ref_unique/hr/
Before this commit, the partner_ref_unique could be changed on the
company even if existing partners share the same internal ref.

Therefore, errors will appear afterwards as DB already contains
duplicates although the policy shouldn't allow it.

With this change, the error will appear as soon as the policy is
changed, so that the data must be fixed before activating the
constraint.
…ompany

Add pre_init_hook to speed up module installation
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: partner-contact-12.0/partner-contact-12.0-partner_ref_unique
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-partner_ref_unique/
Currently translated at 100.0% (8 of 8 strings)

Translation: partner-contact-12.0/partner-contact-12.0-partner_ref_unique
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-partner_ref_unique/es/
Currently translated at 100.0% (8 of 8 strings)

Translation: partner-contact-12.0/partner-contact-12.0-partner_ref_unique
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-partner_ref_unique/de/
If merging 2 contacts, one with reference, and another without, and being the target
one the contact without reference, the constraint is raised as the reference value
is copied before unlinking the other contact.

We avoid it disabling the constraint when merging.
Currently translated at 100.0% (9 of 9 strings)

Translation: partner-contact-15.0/partner-contact-15.0-partner_ref_unique
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-15-0/partner-contact-15-0-partner_ref_unique/ca/
@quannguyen1560
Copy link

@diogocsc did you add yourself into the contributor yet?

@rousseldenis
Copy link
Contributor

/ocabot migration partner_ref_unique

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Apr 7, 2023
@OCA-git-bot
Copy link
Contributor

The migration issue (#1353) has been updated to reference the current pull request.
however, a previous pull request was referenced : #1375.
Perhaps you should check that there is no duplicate work.
CC : @deu-dev

Copy link
Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

Code review.

@diogocsc Next time, could you split pre-commit stuffs (like setup folder) in separate commit from migration changes as explained in https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0 ?

Thanks

@diogocsc
Copy link
Contributor Author

diogocsc commented May 3, 2023

Will do @rousseldenis . Thanks for the feedback.

Copy link
Contributor

@Highcooley Highcooley left a comment

Choose a reason for hiding this comment

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

Functional review OK

@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). 🤖

partner_ref_unique/tests/test_res_partner_ref.py Outdated Show resolved Hide resolved
partner_ref_unique/models/res_partner.py Outdated Show resolved Hide resolved
partner_ref_unique/tests/test_res_partner_ref.py Outdated Show resolved Hide resolved
partner_ref_unique/tests/test_res_partner_ref.py Outdated Show resolved Hide resolved
@RodrigoBM
Copy link

ping @diogocsc

@diogocsc
Copy link
Contributor Author

ping @diogocsc

Please check latest commit @RodrigoBM

@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). 🤖

@rousseldenis
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-1495-by-rousseldenis-bump-nobump, awaiting test results.

@RodrigoBM
Copy link

ping @diogocsc

Please check latest commit @RodrigoBM

Good job!

@OCA-git-bot OCA-git-bot merged commit e5f5203 into OCA:16.0 May 26, 2023
@OCA-git-bot
Copy link
Contributor

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

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.