diff --git a/docsource/modules130-140.rst b/docsource/modules130-140.rst index 700bb2f397e1..f3485dee5101 100644 --- a/docsource/modules130-140.rst +++ b/docsource/modules130-140.rst @@ -108,7 +108,7 @@ Module coverage 13.0 -> 14.0 +--------------------------------------------+-------------------------------------------------+ |crm | Done | +--------------------------------------------+-------------------------------------------------+ -|crm_iap_lead | | +|crm_iap_lead | Done | +--------------------------------------------+-------------------------------------------------+ |crm_iap_lead_enrich | | +--------------------------------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/crm_iap_lead/14.0.1.1/pre-migration.py b/openupgrade_scripts/scripts/crm_iap_lead/14.0.1.1/pre-migration.py new file mode 100644 index 000000000000..6ebb5dfcba19 --- /dev/null +++ b/openupgrade_scripts/scripts/crm_iap_lead/14.0.1.1/pre-migration.py @@ -0,0 +1,27 @@ +from openupgradelib import openupgrade + + +def m2m_columns_and_tables_renamed(env): + openupgrade.rename_columns( + env.cr, + { + "crm_iap_lead_mining_request_crm_lead_tag_rel": [ + ("crm_lead_tag_id", "crm_tag_id") + ] + }, + ) + + openupgrade.rename_tables( + env.cr, + [ + ( + "crm_iap_lead_mining_request_crm_lead_tag_rel", + "crm_iap_lead_mining_request_crm_tag_rel", + ) + ], + ) + + +@openupgrade.migrate() +def migrate(env, version): + m2m_columns_and_tables_renamed(env) diff --git a/openupgrade_scripts/scripts/crm_iap_lead/14.0.1.1/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/crm_iap_lead/14.0.1.1/upgrade_analysis_work.txt new file mode 100644 index 000000000000..5a2fee618fc2 --- /dev/null +++ b/openupgrade_scripts/scripts/crm_iap_lead/14.0.1.1/upgrade_analysis_work.txt @@ -0,0 +1,17 @@ +---Models in module 'crm_iap_lead'--- +---Fields in module 'crm_iap_lead'--- +crm_iap_lead / crm.iap.lead.mining.request / tag_ids (many2many) : column2 is now 'crm_tag_id' ('crm_lead_tag_id') [crm_iap_lead_mining_request_crm_lead_tag_rel] +crm_iap_lead / crm.iap.lead.mining.request / tag_ids (many2many) : relation is now 'crm.tag' ('crm.lead.tag') [nothing to do] +crm_iap_lead / crm.iap.lead.mining.request / tag_ids (many2many) : table is now 'crm_iap_lead_mining_request_crm_tag_rel' ('crm_iap_lead_mining_request_crm_lead_tag_rel') +# DONE: pre-migration: renamed tables and columns + +crm_iap_lead / crm.iap.lead.mining.request / team_id (many2one) : now a function +# NOTHING TO DO: automated field filling + +crm_iap_lead / crm.lead / reveal_id (char) : module is now 'iap_crm' ('crm_iap_lead') +# NOTHING TO DO: the crm_iap_lead module depends on iap_crm module + +---XML records in module 'crm_iap_lead'--- +NEW ir.ui.view: crm_iap_lead.enrich_company +DEL ir.ui.view: crm_iap_lead.lead_message_template +# NOTHING TO DO: noupdate="0" records