diff --git a/docsource/modules140-150.rst b/docsource/modules140-150.rst index 62cbffcd9384..9e0e9b2ed7a8 100644 --- a/docsource/modules140-150.rst +++ b/docsource/modules140-150.rst @@ -106,7 +106,7 @@ Module coverage 14.0 -> 15.0 +-------------------------------------------------+----------------------+-------------------------------------------------+ | coupon | | | +-------------------------------------------------+----------------------+-------------------------------------------------+ -| crm | | | +| crm | Done | | +-------------------------------------------------+----------------------+-------------------------------------------------+ | |new| crm_iap_enrich | |Renamed from crm_iap_lead_enrich. | +-------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/crm/15.0.1.6/post-migration.py b/openupgrade_scripts/scripts/crm/15.0.1.6/post-migration.py new file mode 100644 index 000000000000..ab3acc196da7 --- /dev/null +++ b/openupgrade_scripts/scripts/crm/15.0.1.6/post-migration.py @@ -0,0 +1,17 @@ +from openupgradelib import openupgrade + + +def try_delete_noupdate_records(env): + openupgrade.delete_records_safely_by_xml_id( + env, + [ + "crm.mail_alias_lead_info", + "crm.email_template_opportunity_mail", + ], + ) + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data(env.cr, "crm", "15.0.1.6/noupdate_changes.xml") + try_delete_noupdate_records(env) diff --git a/openupgrade_scripts/scripts/crm/15.0.1.6/pre-migration.py b/openupgrade_scripts/scripts/crm/15.0.1.6/pre-migration.py new file mode 100644 index 000000000000..64b84a807541 --- /dev/null +++ b/openupgrade_scripts/scripts/crm/15.0.1.6/pre-migration.py @@ -0,0 +1,14 @@ +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.convert_field_to_html(env.cr, "crm_lead", "description", "description") + openupgrade.logged_query( + env.cr, + """ + ALTER TABLE crm_team_member + ADD COLUMN assignment_max INTEGER DEFAULT 30; + ALTER TABLE crm_team_member ALTER COLUMN assignment_max DROP DEFAULT; + """, + ) diff --git a/openupgrade_scripts/scripts/crm/15.0.1.6/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/crm/15.0.1.6/upgrade_analysis_work.txt new file mode 100644 index 000000000000..8ee0732fcb0f --- /dev/null +++ b/openupgrade_scripts/scripts/crm/15.0.1.6/upgrade_analysis_work.txt @@ -0,0 +1,70 @@ +---Models in module 'crm'--- +new model crm.lead.pls.update [transient] +# NOTHING TO DO + +---Fields in module 'crm'--- +crm / crm.lead / calendar_event_ids (one2many) : NEW relation: calendar.event +crm / crm.lead / company_currency (many2one) : not related anymore +crm / crm.lead / company_currency (many2one) : now a function +crm / crm.lead / company_id (many2one) : now a function +# NOTHING TO DO: Handle by ORM + +crm / crm.lead / description (text) : type is now 'html' ('text') +# DONE: pre-migration: convert text to html + +crm / crm.team / assignment_domain (char) : NEW +crm / crm.team / assignment_optout (boolean) : NEW +crm / crm.team.member / assignment_domain (char) : NEW +# NOTHING TO DO: new feature + +crm / crm.team.member / assignment_max (integer) : NEW hasdefault +# DONE: pre-migration: create and set default value for column 'assignment_max' is 30 + +crm / crm.team.member / assignment_optout (boolean) : NEW +crm / res.partner / meeting_count (integer) : module is now 'calendar' ('crm') +crm / res.partner / meeting_ids (many2many) : module is now 'calendar' ('crm') +crm / res.users / meeting_count (integer) : module is now 'calendar' ('crm') +crm / res.users / meeting_ids (many2many) : module is now 'calendar' ('crm') +# NOTHING TO DO: Handle by ORM + +---XML records in module 'crm'--- +NEW crm.lead.scoring.frequency.field: crm.frequency_field_tag_ids (noupdate) +NEW ir.actions.act_window: crm.action_lead_mail_compose +NEW ir.actions.act_window: crm.crm_lead_action_forecast +NEW ir.actions.act_window: crm.crm_lead_action_open_lead_form +NEW ir.actions.act_window: crm.crm_lead_pls_update_action +DEL ir.actions.act_window: crm.crm_lead_act_window_compose +NEW ir.actions.act_window.view: crm.action_report_crm_lead_salesteam_view_graph +NEW ir.actions.act_window.view: crm.action_report_crm_lead_salesteam_view_pivot +NEW ir.actions.act_window.view: crm.action_report_crm_lead_salesteam_view_tree +NEW ir.actions.act_window.view: crm.crm_lead_action_forecast_view_graph +NEW ir.actions.act_window.view: crm.crm_lead_action_forecast_view_kanban +NEW ir.actions.act_window.view: crm.crm_lead_action_forecast_view_pivot +NEW ir.actions.act_window.view: crm.crm_lead_action_forecast_view_tree +NEW ir.actions.server: crm.action_opportunity_forecast +NEW ir.cron: crm.ir_cron_crm_lead_assign (noupdate) +NEW ir.model.access: crm.crm_lead_pls_update_access_system +DEL ir.model.access: crm.access_crm_lead_partner_manager +NEW ir.ui.menu: crm.crm_menu_forecast +NEW ir.ui.menu: crm.crm_team_member_config +NEW ir.ui.view: crm.crm_action_helper +NEW ir.ui.view: crm.crm_lead_pls_update_view_form +NEW ir.ui.view: crm.crm_lead_view_graph_forecast +NEW ir.ui.view: crm.crm_lead_view_kanban_forecast +NEW ir.ui.view: crm.crm_lead_view_pivot_forecast +NEW ir.ui.view: crm.crm_lead_view_search_forecast +NEW ir.ui.view: crm.crm_lead_view_tree_forecast +NEW ir.ui.view: crm.crm_team_member_view_form +NEW ir.ui.view: crm.crm_team_member_view_kanban +NEW ir.ui.view: crm.crm_team_member_view_tree +NEW ir.ui.view: crm.crm_team_view_kanban_dashboard +NEW ir.ui.view: crm.crm_team_view_tree +DEL ir.ui.view: crm.assets_backend +DEL ir.ui.view: crm.assets_tests +DEL ir.ui.view: crm.crm_team_salesteams_view_kanban +DEL ir.ui.view: crm.qunit_suite +# NOTHING TO DO + +DEL mail.alias: crm.mail_alias_lead_info (noupdate) +DEL mail.template: crm.email_template_opportunity_mail (noupdate) +# DONE: post-migration: safely deleted xmlids