You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
781 B

  1. # Copyright 2016 Tecnativa - Jairo Llopis
  2. # Copyright 2016 Tecnativa - Vicent Cubells
  3. # Copyright 2017-2019 Tecnativa - Pedro M. Baeza
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  5. from odoo import models
  6. class BasePartnerMergeAutomaticWizard(models.TransientModel):
  7. _inherit = "base.partner.merge.automatic.wizard"
  8. def _merge(self, partner_ids, dst_partner=None, extra_checks=True):
  9. """Pass extra_checks=False if we have the extra group for avoiding
  10. the checks.
  11. """
  12. if self.env.user.has_group(
  13. 'partner_deduplicate_acl.group_unrestricted'
  14. ):
  15. extra_checks = False
  16. return super()._merge(
  17. partner_ids, dst_partner=dst_partner, extra_checks=extra_checks,
  18. )