From 71e7470af0045c9b6905fddbcbc751f56eb841f3 Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 12 Jul 2021 11:13:05 +0200 Subject: [PATCH] [MIG] maintenance --- docsource/modules130-140.rst | 2 +- .../maintenance/14.0.1.0/noupdate_changes.xml | 8 +++---- .../maintenance/14.0.1.0/post-migration.py | 8 +++++++ .../maintenance/14.0.1.0/pre-migration.py | 22 +++++++++++++++++++ .../14.0.1.0/upgrade_analysis_work.txt | 12 ++++++++++ 5 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 openupgrade_scripts/scripts/maintenance/14.0.1.0/post-migration.py create mode 100644 openupgrade_scripts/scripts/maintenance/14.0.1.0/pre-migration.py create mode 100644 openupgrade_scripts/scripts/maintenance/14.0.1.0/upgrade_analysis_work.txt diff --git a/docsource/modules130-140.rst b/docsource/modules130-140.rst index 5c234613b5a6..9f2cf0c81ff2 100644 --- a/docsource/modules130-140.rst +++ b/docsource/modules130-140.rst @@ -416,7 +416,7 @@ Module coverage 13.0 -> 14.0 +--------------------------------------------+-------------------------------------------------+ | |new| mail_client_extension | | +--------------------------------------------+-------------------------------------------------+ -|maintenance | | +|maintenance | Done | +--------------------------------------------+-------------------------------------------------+ |mass_mailing | | +--------------------------------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/maintenance/14.0.1.0/noupdate_changes.xml b/openupgrade_scripts/scripts/maintenance/14.0.1.0/noupdate_changes.xml index d14809ce6655..552264f9a761 100644 --- a/openupgrade_scripts/scripts/maintenance/14.0.1.0/noupdate_changes.xml +++ b/openupgrade_scripts/scripts/maintenance/14.0.1.0/noupdate_changes.xml @@ -1,16 +1,16 @@ - + - + - + - + diff --git a/openupgrade_scripts/scripts/maintenance/14.0.1.0/post-migration.py b/openupgrade_scripts/scripts/maintenance/14.0.1.0/post-migration.py new file mode 100644 index 000000000000..fd1b13314f35 --- /dev/null +++ b/openupgrade_scripts/scripts/maintenance/14.0.1.0/post-migration.py @@ -0,0 +1,8 @@ +# Copyright 2021 ForgeFlow S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data(env.cr, "maintenance", "14.0.1.0/noupdate_changes.xml") diff --git a/openupgrade_scripts/scripts/maintenance/14.0.1.0/pre-migration.py b/openupgrade_scripts/scripts/maintenance/14.0.1.0/pre-migration.py new file mode 100644 index 000000000000..459cff499d33 --- /dev/null +++ b/openupgrade_scripts/scripts/maintenance/14.0.1.0/pre-migration.py @@ -0,0 +1,22 @@ +# 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, + "maintenance", + [ + "equipment_request_rule_admin_user", + "equipment_request_rule_user", + "equipment_rule_admin_user", + "equipment_rule_user", + "maintenance_equipment_category_comp_rule", + "maintenance_equipment_comp_rule", + "maintenance_request_comp_rule", + "maintenance_team_comp_rule", + ], + True, + ) diff --git a/openupgrade_scripts/scripts/maintenance/14.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/maintenance/14.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..9585d88db08d --- /dev/null +++ b/openupgrade_scripts/scripts/maintenance/14.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,12 @@ +---Models in module 'maintenance'--- +---Fields in module 'maintenance'--- +---XML records in module 'maintenance'--- +ir.rule: maintenance.equipment_request_rule_admin_user (noupdate) (noupdate switched) +ir.rule: maintenance.equipment_request_rule_user (noupdate) (noupdate switched) +ir.rule: maintenance.equipment_rule_admin_user (noupdate) (noupdate switched) +ir.rule: maintenance.equipment_rule_user (noupdate) (noupdate switched) +ir.rule: maintenance.maintenance_equipment_category_comp_rule (noupdate) (noupdate switched) +ir.rule: maintenance.maintenance_equipment_comp_rule (noupdate) (noupdate switched) +ir.rule: maintenance.maintenance_request_comp_rule (noupdate) (noupdate switched) +ir.rule: maintenance.maintenance_team_comp_rule (noupdate) (noupdate switched) +# DONE: pre-migration: switched noupdate