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

[10.0][MIG] crm_deduplicate_acl #152

Merged
merged 16 commits into from
Jun 7, 2017

Conversation

luismontalba
Copy link
Member

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
    :

    • Manually allows him to do the manual deduplication process.
    • Automatically allows him to do the automatic deduplication process.
    • Without restrictions executes the chosen deduplication method with admin
      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

yajo and others added 14 commits May 30, 2017 09:59
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.
{
"name": "Deduplicate Contacts ACL",
"summary": "Contact deduplication with fine-grained permission control",
"version": "10.0.1.1.0",
Copy link
Member

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

Known issues / Roadmap
======================

* Wizard's code is partially written in old API because somehow [possibly]
Copy link
Member

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.

{
"name": "Deduplicate Contacts ACL",
"summary": "Contact deduplication with fine-grained permission control",
"version": "10.0.1.1.0",
Copy link
Member

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."))

Copy link
Member

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
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

@rafaelbn rafaelbn added this to the 10.0 milestone May 31, 2017
child_ids = self.env['res.partner']
for partner_id in partner_ids:
child_ids |= Partner.search([('id', 'child_of', [partner_id.id])])\
- partner_id
Copy link
Member

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

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.

It would be better to have tests, but these ones are complicated to be done, so we continue this way.

@pedrobaeza
Copy link
Member

@chienandalu please give final review

@pedrobaeza pedrobaeza mentioned this pull request Jun 7, 2017
24 tasks
@pedrobaeza pedrobaeza merged commit 6811a13 into OCA:10.0 Jun 7, 2017
@pedrobaeza pedrobaeza deleted the 10.0-mig-crm_deduplicate_acl branch June 7, 2017 15:25
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.

None yet

8 participants