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.

18 lines
625 B

  1. # Copyright 2020 Tecnativa - Pedro M. Baeza
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. from odoo import models
  4. class BasePartnerMergeAutomaticWizard(models.TransientModel):
  5. _inherit = "base.partner.merge.automatic.wizard"
  6. def action_merge(self):
  7. """Inject context for avoiding the duplicate reference constraint that
  8. happens when merging one contact with reference in another without
  9. reference.
  10. """
  11. return super(
  12. BasePartnerMergeAutomaticWizard,
  13. self.with_context(partner_ref_unique_merging=True),
  14. ).action_merge()