# Copyright 2022 ForgeFlow S.L.  <https://www.forgeflow.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=C7902
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
    openupgrade.rename_columns(
        env.cr,
        {
            "account_analytic_contract_line_account_tax_rel": [
                ("account_analytic_contract_line_id", "contract_line_id")
            ]
        },
    )
    openupgrade.rename_tables(
        env.cr,
        [
            (
                "account_analytic_contract_line_account_tax_rel",
                "account_tax_contract_line_rel",
            )
        ],
    )

@@ -322,32 +322,31 @@
 nt_analytic_
-contract
+invoice
 _line_accoun
@@ -390,32 +390,31 @@
 nt_analytic_
-contract
+invoice
 _line_id%22, %22
@@ -568,24 +568,23 @@
 nalytic_
-contract
+invoice
 _line_ac

fix migration scripts