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

[18.0][MIG] partner_ref_unique #1860

Merged
merged 42 commits into from
Oct 15, 2024
Merged

Conversation

samirGuesmi
Copy link
Member

No description provided.

antespi and others added 30 commits October 10, 2024 15:57
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/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: partner-contact-16.0/partner-contact-16.0-partner_ref_unique
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_ref_unique/
Gelo-fl and others added 12 commits October 10, 2024 15:57
Currently translated at 100.0% (9 of 9 strings)

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

Translation: partner-contact-16.0/partner-contact-16.0-partner_ref_unique
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_ref_unique/fr/
Currently translated at 100.0% (9 of 9 strings)

Translation: partner-contact-16.0/partner-contact-16.0-partner_ref_unique
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_ref_unique/fr_FR/
Currently translated at 100.0% (9 of 9 strings)

Translation: partner-contact-16.0/partner-contact-16.0-partner_ref_unique
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-partner_ref_unique/it/
Currently translated at 100.0% (9 of 9 strings)

Translation: partner-contact-17.0/partner-contact-17.0-partner_ref_unique
Translate-URL: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-partner_ref_unique/sv/
Copy link
Contributor

@marielejeune marielejeune left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@houssine78 houssine78 left a comment

Choose a reason for hiding this comment

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

LGTM

@houssine78
Copy link

@pedrobaeza this PR is ready :)

@pedrobaeza pedrobaeza changed the title 18.0 mig partner ref unique [18.0][MIG] partner_ref_unique Oct 15, 2024
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 migration partner_ref_unique

@samirGuesmi please next time put the proper title like the one I have put.

/ocabot merge nobump

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Oct 15, 2024
@OCA-git-bot
Copy link
Contributor

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

@OCA-git-bot OCA-git-bot mentioned this pull request Oct 15, 2024
45 tasks
@OCA-git-bot OCA-git-bot merged commit ca21f7f into OCA:18.0 Oct 15, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at f315daf. 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.