From 0a260a40540b77f63726bab7b49b180b57c357c5 Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 19 Jul 2021 15:31:00 +0200 Subject: [PATCH] [MIG] mass_mailing --- docsource/modules130-140.rst | 2 +- .../mass_mailing/14.0.2.2/pre-migration.py | 35 ++++++++++++ .../14.0.2.2/upgrade_analysis_work.txt | 57 +++++++++++++++++++ 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 openupgrade_scripts/scripts/mass_mailing/14.0.2.2/pre-migration.py create mode 100644 openupgrade_scripts/scripts/mass_mailing/14.0.2.2/upgrade_analysis_work.txt diff --git a/docsource/modules130-140.rst b/docsource/modules130-140.rst index d9041055e29a..8a90c344c4a2 100644 --- a/docsource/modules130-140.rst +++ b/docsource/modules130-140.rst @@ -418,7 +418,7 @@ Module coverage 13.0 -> 14.0 +--------------------------------------------+-------------------------------------------------+ |maintenance | | +--------------------------------------------+-------------------------------------------------+ -|mass_mailing | | +|mass_mailing | Done | +--------------------------------------------+-------------------------------------------------+ |mass_mailing_crm | | +--------------------------------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/mass_mailing/14.0.2.2/pre-migration.py b/openupgrade_scripts/scripts/mass_mailing/14.0.2.2/pre-migration.py new file mode 100644 index 000000000000..1aedf3d1ffaa --- /dev/null +++ b/openupgrade_scripts/scripts/mass_mailing/14.0.2.2/pre-migration.py @@ -0,0 +1,35 @@ +# Copyright 2021 ForgeFlow S.L. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + +_xmlid_renames = [ + ( + "mass_mailing.view_mail_mass_mailing_contact_form", + "mass_mailing.mailing_contact_view_form", + ), + ( + "mass_mailing.view_mail_mass_mailing_contact_graph", + "mass_mailing.mailing_contact_view_graph", + ), + ( + "mass_mailing.view_mail_mass_mailing_contact_kanban", + "mass_mailing.mailing_contact_view_kanban", + ), + ( + "mass_mailing.view_mail_mass_mailing_contact_pivot", + "mass_mailing.mailing_contact_view_pivot", + ), + ( + "mass_mailing.view_mail_mass_mailing_contact_search", + "mass_mailing.mailing_contact_view_search", + ), + ( + "mass_mailing.view_mail_mass_mailing_contact_tree", + "mass_mailing.mailing_contact_view_tree", + ), +] + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.rename_xmlids(env.cr, _xmlid_renames) diff --git a/openupgrade_scripts/scripts/mass_mailing/14.0.2.2/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/mass_mailing/14.0.2.2/upgrade_analysis_work.txt new file mode 100644 index 000000000000..1220a1463970 --- /dev/null +++ b/openupgrade_scripts/scripts/mass_mailing/14.0.2.2/upgrade_analysis_work.txt @@ -0,0 +1,57 @@ +---Models in module 'mass_mailing'--- +---Fields in module 'mass_mailing'--- +mass_mailing / mailing.contact / message_has_sms_error (boolean): previously in module sms +mass_mailing / mailing.contact / website_message_ids (one2many): previously in module portal +mass_mailing / mailing.mailing / message_has_sms_error (boolean): previously in module sms +mass_mailing / mailing.mailing / website_message_ids (one2many): previously in module portal +# NOTHING TO DO: handled by ORM + +mass_mailing / mailing.mailing / copyvalue (char) : NEW +mass_mailing / mailing.mailing / lang (char) : NEW +mass_mailing / mailing.mailing / model_object_field (many2one) : NEW relation: ir.model.fields +mass_mailing / mailing.mailing / null_value (char) : NEW +mass_mailing / mailing.mailing / sub_model_object_field (many2one): NEW relation: ir.model.fields +mass_mailing / mailing.mailing / sub_object (many2one) : NEW relation: ir.model +# NOTHING TO DO: fields of mail.render.mixin + + +mass_mailing / mailing.mailing / kpi_mail_required (boolean) : NEW +mass_mailing / mailing.mailing / preview (char) : NEW +# NOTHING TO DO: new features + +mass_mailing / mailing.mailing / mailing_domain (char) : now a function +mass_mailing / mailing.mailing / mailing_model_id (many2one) : now required, req_default: function +mass_mailing / mailing.mailing / medium_id (many2one) : now a function +mass_mailing / mailing.mailing / reply_to (char) : now a function +mass_mailing / mailing.mailing / reply_to_mode (selection) : now a function +# NOTHING TO DO: computed in load + +---XML records in module 'mass_mailing'--- +DEL ir.actions.act_window: mass_mailing.link_tracker_action_mass_mailing +DEL ir.actions.act_window: mass_mailing.link_tracker_action_mass_mailing_campaign +NEW ir.model.access: mass_mailing.access_mail_blacklist_remove_mass_mailing_user +NEW ir.model.access: mass_mailing.access_mailing_list_merge +NEW ir.model.access: mass_mailing.access_mailing_mailing_schedule_date +NEW ir.model.access: mass_mailing.access_mailing_mailing_test +NEW ir.ui.view: mass_mailing.assets_common +NEW ir.ui.view: mass_mailing.mass_mailing_kpi_link_trackers (noupdate) +NEW ir.ui.view: mass_mailing.s_mail_block_header_view +NEW ir.ui.view: mass_mailing.social_links +NEW ir.ui.view: mass_mailing.view +NEW mailing.contact: mass_mailing.mass_mailing_contact_0 (noupdate) +NEW mailing.list: mass_mailing.mailing_list_data (noupdate) +# NOTHING TO DO + +NEW ir.ui.view: mass_mailing.mailing_contact_view_form +NEW ir.ui.view: mass_mailing.mailing_contact_view_graph +NEW ir.ui.view: mass_mailing.mailing_contact_view_kanban +NEW ir.ui.view: mass_mailing.mailing_contact_view_pivot +NEW ir.ui.view: mass_mailing.mailing_contact_view_search +NEW ir.ui.view: mass_mailing.mailing_contact_view_tree +DEL ir.ui.view: mass_mailing.view_mail_mass_mailing_contact_form +DEL ir.ui.view: mass_mailing.view_mail_mass_mailing_contact_graph +DEL ir.ui.view: mass_mailing.view_mail_mass_mailing_contact_kanban +DEL ir.ui.view: mass_mailing.view_mail_mass_mailing_contact_pivot +DEL ir.ui.view: mass_mailing.view_mail_mass_mailing_contact_search +DEL ir.ui.view: mass_mailing.view_mail_mass_mailing_contact_tree +# DONE: pre-migration: renamed xmlids