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.

24 lines
857 B

  1. # Copyright 2021 ACSONE SA/NV
  2. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  3. from openupgradelib import openupgrade
  4. @openupgrade.migrate(use_env=True)
  5. def migrate(env, version):
  6. param_duplicate = env["ir.config_parameter"].search(
  7. [("key", "=", "partner_email_check_filter_duplicates")]
  8. )
  9. if param_duplicate:
  10. env["res.company"].search([]).write(
  11. {"partner_email_check_filter_duplicates": param_duplicate.value}
  12. )
  13. param_duplicate.unlink()
  14. param_deliverability = env["ir.config_parameter"].search(
  15. [("key", "=", "partner_email_check_check_deliverability")]
  16. )
  17. if param_deliverability:
  18. env["res.company"].search([]).write(
  19. {"partner_email_check_check_deliverability": param_deliverability.value}
  20. )
  21. param_deliverability.unlink()