-
-
Notifications
You must be signed in to change notification settings - Fork 851
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
Conversation
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.
- Added OCA icon
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/
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/
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
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
@pedrobaeza this PR is ready :) |
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 migration partner_ref_unique
@samirGuesmi please next time put the proper title like the one I have put.
/ocabot merge nobump
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at f315daf. Thanks a lot for contributing to OCA. ❤️ |
No description provided.