From 7579055e38515d4e4381eb0c9eae3027ee4e7278 Mon Sep 17 00:00:00 2001 From: RaulOForgeFlow Date: Wed, 28 Apr 2021 12:51:32 +0200 Subject: [PATCH 1/2] [14.0][MIG] board --- doc/source/modules130-140.rst | 2 +- .../scripts/board/14.0.1.0/pre-migration.py | 13 +++++++++++++ .../board/14.0.1.0/upgrade_analysis_work.txt | 9 +++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 openupgrade_scripts/scripts/board/14.0.1.0/pre-migration.py create mode 100644 openupgrade_scripts/scripts/board/14.0.1.0/upgrade_analysis_work.txt diff --git a/doc/source/modules130-140.rst b/doc/source/modules130-140.rst index 151660e40d16..ab9a7c6dcadb 100644 --- a/doc/source/modules130-140.rst +++ b/doc/source/modules130-140.rst @@ -90,7 +90,7 @@ Module coverage 13.0 -> 14.0 +--------------------------------------------+-------------------------------------------------+ |base_vat | | +--------------------------------------------+-------------------------------------------------+ -|board | | +|board | Done | +--------------------------------------------+-------------------------------------------------+ |bus | Nothing to do | +--------------------------------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/board/14.0.1.0/pre-migration.py b/openupgrade_scripts/scripts/board/14.0.1.0/pre-migration.py new file mode 100644 index 000000000000..7b5b4c85fed6 --- /dev/null +++ b/openupgrade_scripts/scripts/board/14.0.1.0/pre-migration.py @@ -0,0 +1,13 @@ +# Copyright 2021 ForgeFlow S.L. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.set_xml_ids_noupdate_value( + env, + "board", + ["menu_board_my_dash"], + False, + ) diff --git a/openupgrade_scripts/scripts/board/14.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/board/14.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..db8cf0dde1df --- /dev/null +++ b/openupgrade_scripts/scripts/board/14.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,9 @@ +---Models in module 'board'--- +---Fields in module 'board'--- +---XML records in module 'board'--- +NEW ir.model.access: board.access_board_board_all +DEL ir.model.access: board.access_board_board all +# NOTHING TO DO: noupdate="0" records + +ir.ui.menu: board.menu_board_my_dash (noupdate switched) +# DONE: pre-migration: switched to noupdate = "0" \ No newline at end of file From 8c17dfe4ad36ecf6d4517a3290c53ee595bc5c22 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sun, 6 Jun 2021 18:00:14 +0200 Subject: [PATCH 2/2] [IMP] board: Complete migration scripts --- openupgrade_scripts/scripts/board/14.0.1.0/pre-migration.py | 3 +++ .../scripts/board/14.0.1.0/upgrade_analysis_work.txt | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/openupgrade_scripts/scripts/board/14.0.1.0/pre-migration.py b/openupgrade_scripts/scripts/board/14.0.1.0/pre-migration.py index 7b5b4c85fed6..d2be8c2e2cbe 100644 --- a/openupgrade_scripts/scripts/board/14.0.1.0/pre-migration.py +++ b/openupgrade_scripts/scripts/board/14.0.1.0/pre-migration.py @@ -5,6 +5,9 @@ @openupgrade.migrate() def migrate(env, version): + openupgrade.rename_xmlids( + env.cr, [("board.access_board_board all", "board.access_board_board_all")] + ) openupgrade.set_xml_ids_noupdate_value( env, "board", diff --git a/openupgrade_scripts/scripts/board/14.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/board/14.0.1.0/upgrade_analysis_work.txt index db8cf0dde1df..c142d6708696 100644 --- a/openupgrade_scripts/scripts/board/14.0.1.0/upgrade_analysis_work.txt +++ b/openupgrade_scripts/scripts/board/14.0.1.0/upgrade_analysis_work.txt @@ -3,7 +3,7 @@ ---XML records in module 'board'--- NEW ir.model.access: board.access_board_board_all DEL ir.model.access: board.access_board_board all -# NOTHING TO DO: noupdate="0" records +# DONE: Rename XML-ID ir.ui.menu: board.menu_board_my_dash (noupdate switched) -# DONE: pre-migration: switched to noupdate = "0" \ No newline at end of file +# DONE: pre-migration: switched to noupdate = "0"