From ddfdcd5c09efeee3d929c1ccd5ce117776622d35 Mon Sep 17 00:00:00 2001 From: Alexis Date: Fri, 13 Sep 2024 13:27:44 -0400 Subject: [PATCH] [MIG] crm: Migration to 17.0 --- docsource/modules160-170.rst | 2 +- .../scripts/crm/17.0.1.8/pre-migration.py | 13 ++++++++ .../crm/17.0.1.8/upgrade_analysis_work.txt | 32 +++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 openupgrade_scripts/scripts/crm/17.0.1.8/pre-migration.py create mode 100644 openupgrade_scripts/scripts/crm/17.0.1.8/upgrade_analysis_work.txt diff --git a/docsource/modules160-170.rst b/docsource/modules160-170.rst index 0ae89b703492..18ddf6f46cf2 100644 --- a/docsource/modules160-170.rst +++ b/docsource/modules160-170.rst @@ -102,7 +102,7 @@ Module coverage 16.0 -> 17.0 +---------------------------------------------------+----------------------+-------------------------------------------------+ | contacts | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ -| crm | | | +| crm | Done | | +---------------------------------------------------+----------------------+-------------------------------------------------+ | crm_iap_enrich | |No DB layout changes. | +---------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/crm/17.0.1.8/pre-migration.py b/openupgrade_scripts/scripts/crm/17.0.1.8/pre-migration.py new file mode 100644 index 000000000000..7cc1059003fc --- /dev/null +++ b/openupgrade_scripts/scripts/crm/17.0.1.8/pre-migration.py @@ -0,0 +1,13 @@ +# Copyright 2024 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openupgradelib import openupgrade + +_field_renames = [ + ("crm.lead", "crm_lead", "date_action_last", "date_automation_last"), +] + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.rename_fields(env, _field_renames) diff --git a/openupgrade_scripts/scripts/crm/17.0.1.8/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/crm/17.0.1.8/upgrade_analysis_work.txt new file mode 100644 index 000000000000..d2bbb33ea782 --- /dev/null +++ b/openupgrade_scripts/scripts/crm/17.0.1.8/upgrade_analysis_work.txt @@ -0,0 +1,32 @@ +---Models in module 'crm'--- +---Fields in module 'crm'--- +crm / crm.lead / activity_user_id (many2one) : not related anymore +crm / crm.lead / activity_user_id (many2one) : now a function +# NOTHING TO DO: + +crm / crm.lead / date_action_last (datetime) : DEL +crm / crm.lead / date_automation_last (datetime): NEW +DONE: pre-migration + +crm / crm.lead / email_domain_criterion (char) : NEW isfunction: function, stored +crm / crm.lead / message_main_attachment_id (many2one): DEL relation: ir.attachment +crm / crm.lead / rating_ids (one2many) : NEW relation: rating.rating +crm / crm.lead / recurring_revenue_prorated (float): NEW isfunction: function, stored +# NOTHING TO DO: + +---XML records in module 'crm'--- +NEW ir.actions.act_window: crm.mail_activity_plan_action_lead +DEL ir.actions.server: crm.action_mark_as_lost +NEW ir.model.access: crm.access_crm_activity_report_salesman +NEW ir.model.access: crm.access_mail_activity_plan_sale_manager +NEW ir.model.access: crm.access_mail_activity_plan_template_sale_manager +# NOTHING TO DO: + +NEW ir.rule: crm.mail_plan_rule_group_sale_manager_lead (noupdate) +NEW ir.rule: crm.mail_plan_templates_rule_group_sale_manager_lead (noupdate) +# NOTHING TO DO: Handled by ORM + +NEW ir.ui.menu: crm.mail_activity_plan_menu_config_lead +NEW ir.ui.view: crm.crm_lead_view_tree_opportunity_reporting +NEW ir.ui.view: crm.res_partner_view_form_simple_form +# NOTHING TO DO: