diff --git a/docsource/modules140-150.rst b/docsource/modules140-150.rst index efcd7ce84c4f..5be301fac5b6 100644 --- a/docsource/modules140-150.rst +++ b/docsource/modules140-150.rst @@ -104,7 +104,7 @@ Module coverage 14.0 -> 15.0 +-------------------------------------------------+----------------------+-------------------------------------------------+ | contacts |Nothing to do | | +-------------------------------------------------+----------------------+-------------------------------------------------+ -| coupon | | | +| coupon | Done | | +-------------------------------------------------+----------------------+-------------------------------------------------+ | crm | Done | | +-------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/coupon/15.0.1.0/pre-migration.py b/openupgrade_scripts/scripts/coupon/15.0.1.0/pre-migration.py new file mode 100644 index 000000000000..5c5f57674d86 --- /dev/null +++ b/openupgrade_scripts/scripts/coupon/15.0.1.0/pre-migration.py @@ -0,0 +1,11 @@ +# Copyright 2023 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.rename_xmlids( + env.cr, + [("coupon.mail_template_sale_coupon", "sale_coupon.mail_template_sale_coupon")], + ) diff --git a/openupgrade_scripts/scripts/coupon/15.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/coupon/15.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..afc332dd0ced --- /dev/null +++ b/openupgrade_scripts/scripts/coupon/15.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,8 @@ +---Models in module 'coupon'--- +---Fields in module 'coupon'--- +coupon / coupon.program / company_id (many2one) : now required +# NOTHING TO DO: It was enforced in v14 through the view, so only incorrect code can insert programs without company_id, and the fix belongs to the creators of such code + +---XML records in module 'coupon'--- +DEL mail.template: coupon.mail_template_sale_coupon [renamed to sale_coupon module] (noupdate) +# DONE: pre-migration: XML-ID renamed