From eff976a12da27ebf23731cfb853ebe8481b1e8a7 Mon Sep 17 00:00:00 2001 From: Ygor Carvalho Date: Tue, 28 Mar 2023 20:32:55 -0300 Subject: [PATCH] [IMP] l10n_br_fiscal: add migrations to update field name --- .../migrations/14.0.10.10.0/pre-migration.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 l10n_br_fiscal/migrations/14.0.10.10.0/pre-migration.py diff --git a/l10n_br_fiscal/migrations/14.0.10.10.0/pre-migration.py b/l10n_br_fiscal/migrations/14.0.10.10.0/pre-migration.py new file mode 100644 index 000000000000..2ca7820460c9 --- /dev/null +++ b/l10n_br_fiscal/migrations/14.0.10.10.0/pre-migration.py @@ -0,0 +1,18 @@ +# Copyright (C) 2023 - Ygor Carvalho - KMEE +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openupgradelib import openupgrade + +_field_renames = [ + ( + "res.company", + "res_company", + "nfe_transmission", + "edoc_transmission", + ), +] + + +@openupgrade.migrate(use_env=True) +def migrate(env, version): + openupgrade.rename_fields(env, _field_renames)