Browse Source

[MIG] partner_email_check: Migration to 14.0

14.0
Zar21 3 years ago
parent
commit
1f8ea33e2f
  1. 2
      partner_email_check/__manifest__.py
  2. 24
      partner_email_check/migrations/13.0.1.0.0/post-migration.py

2
partner_email_check/__manifest__.py

@ -3,7 +3,7 @@
{
"name": "Email Format Checker",
"version": "13.0.1.1.0",
"version": "14.0.1.1.0",
"summary": "Validate email address field",
"author": "Komit, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/partner-contact",

24
partner_email_check/migrations/13.0.1.0.0/post-migration.py

@ -1,24 +0,0 @@
# Copyright 2021 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
@openupgrade.migrate(use_env=True)
def migrate(env, version):
param_duplicate = env["ir.config_parameter"].search(
[("key", "=", "partner_email_check_filter_duplicates")]
)
if param_duplicate:
env["res.company"].search([]).write(
{"partner_email_check_filter_duplicates": param_duplicate.value}
)
param_duplicate.unlink()
param_deliverability = env["ir.config_parameter"].search(
[("key", "=", "partner_email_check_check_deliverability")]
)
if param_deliverability:
env["res.company"].search([]).write(
{"partner_email_check_check_deliverability": param_deliverability.value}
)
param_deliverability.unlink()
Loading…
Cancel
Save