From 66ef122d80e49bfb251b9b148549651746eb0613 Mon Sep 17 00:00:00 2001 From: RaulOForgeFlow Date: Tue, 27 Apr 2021 11:48:37 +0200 Subject: [PATCH] [ADD] note: Migration scripts Co-Authored-By: Pedro M. Baeza --- doc/source/modules130-140.rst | 2 +- .../scripts/note/14.0.1.0/noupdate_changes.xml | 4 ++-- .../scripts/note/14.0.1.0/pre-migration.py | 17 +++++++++++++++++ .../note/14.0.1.0/upgrade_analysis_work.txt | 7 +++++++ 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 openupgrade_scripts/scripts/note/14.0.1.0/pre-migration.py create mode 100644 openupgrade_scripts/scripts/note/14.0.1.0/upgrade_analysis_work.txt diff --git a/doc/source/modules130-140.rst b/doc/source/modules130-140.rst index 151660e40d16..1cf132a58d71 100644 --- a/doc/source/modules130-140.rst +++ b/doc/source/modules130-140.rst @@ -438,7 +438,7 @@ Module coverage 13.0 -> 14.0 +--------------------------------------------+-------------------------------------------------+ |mrp_subcontracting_dropshipping | | +--------------------------------------------+-------------------------------------------------+ -|note | | +|note | Done | +--------------------------------------------+-------------------------------------------------+ |note_pad | | +--------------------------------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/note/14.0.1.0/noupdate_changes.xml b/openupgrade_scripts/scripts/note/14.0.1.0/noupdate_changes.xml index bdc89ce0a4ab..02c347199504 100644 --- a/openupgrade_scripts/scripts/note/14.0.1.0/noupdate_changes.xml +++ b/openupgrade_scripts/scripts/note/14.0.1.0/noupdate_changes.xml @@ -1,6 +1,6 @@ - + diff --git a/openupgrade_scripts/scripts/note/14.0.1.0/pre-migration.py b/openupgrade_scripts/scripts/note/14.0.1.0/pre-migration.py new file mode 100644 index 000000000000..1e80d9f89468 --- /dev/null +++ b/openupgrade_scripts/scripts/note/14.0.1.0/pre-migration.py @@ -0,0 +1,17 @@ +# 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, + "note", + [ + "note_note_create_unlink_global", + "note_note_rule_global", + "note_stage_rule_global", + ], + True, + ) diff --git a/openupgrade_scripts/scripts/note/14.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/note/14.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..6ce6b28023ce --- /dev/null +++ b/openupgrade_scripts/scripts/note/14.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,7 @@ +---Models in module 'note'--- +---Fields in module 'note'--- +---XML records in module 'note'--- +ir.rule: note.note_note_create_unlink_global (noupdate) (noupdate switched) +ir.rule: note.note_note_rule_global (noupdate) (noupdate switched) +ir.rule: note.note_stage_rule_global (noupdate) (noupdate switched) +# DONE: pre-migration: noupdate changed to "1", as there's no changes in records data