-
-
Notifications
You must be signed in to change notification settings - Fork 393
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
[10.0][MIG] crm_deduplicate_acl #152
Conversation
This module allows any user to get special permissions to be able to deduplicate contacts, instead of just giving them to a sale manager with settings permissions. The new permissions allow the user to deduplicate: - *Manually*. - *Automatically* (dangerous). - *Without restrictions* (more dangerous). Beware what you do! 😯
…ers from the partner list views (action 'Merge automatically') Use <record id="crm.action_partner_merge"... to change only affected field.
crm_deduplicate_acl/__manifest__.py
Outdated
{ | ||
"name": "Deduplicate Contacts ACL", | ||
"summary": "Contact deduplication with fine-grained permission control", | ||
"version": "10.0.1.1.0", |
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.
s/10.0.1.1.0/10.0.1.0.0
crm_deduplicate_acl/README.rst
Outdated
Known issues / Roadmap | ||
====================== | ||
|
||
* Wizard's code is partially written in old API because somehow [possibly] |
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.
This known issue is not true now.
crm_deduplicate_acl/__manifest__.py
Outdated
{ | ||
"name": "Deduplicate Contacts ACL", | ||
"summary": "Contact deduplication with fine-grained permission control", | ||
"version": "10.0.1.1.0", |
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.
10.0.1.0.0
raise UserError(_("All contacts must have the same email." | ||
" Only the Administrator can merge contacts" | ||
" with different emails.")) | ||
|
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.
Don't add these extra lines (in any case 2, but not also 1 in the middle of the method)
src_partners = ordered_partners[:-1] | ||
_logger.info("dst_partner: %s", dst_partner.id) | ||
|
||
# FIXME: is it still required to make and exception for |
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.
Please check if this is needed, and if not, remove it.
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.
It is still commented in V10:
https://github.com/odoo/odoo/blob/4b102523b584a5383009f2e19b6f7d0c07c61591/addons/crm/wizard/base_partner_merge.py#L321
child_ids = self.env['res.partner'] | ||
for partner_id in partner_ids: | ||
child_ids |= Partner.search([('id', 'child_of', [partner_id.id])])\ | ||
- partner_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.
this indentation is making your lint checks fail
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.
It would be better to have tests, but these ones are complicated to be done, so we continue this way.
@chienandalu please give final review |
Deduplicate Contacts ACL
This module extends the functionality of the CRM contact deduplicator to add
permission groups that allow the matching users to use those tools, not
needing to be the sale settings manager.
Configuration
To configure this module, you need to:
Go to Settings > Users > Users.
Choose a user.
Choose the desired permission level(s) in Appplication > Deduplicate
Contacts:
rigts, to be able to update objects where the user would normally not have
write rights, and to allow him to merge contacts with different email
addresses.
Usage
To use this module, you need to:
#. Ask your admin to give you the new rights.
#. Go to CRM > Tools > Deduplicate Contacts as usual.
cc @Tecnativa