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.

20 lines
759 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 (https://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("partner_deduplicate_acl.group_unrestricted"):
  13. extra_checks = False
  14. return super()._merge(
  15. partner_ids, dst_partner=dst_partner, extra_checks=extra_checks
  16. )