-
-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3754 from Tecnativa/15.0-ou_add-coupon
[15.0][OU-ADD] coupon: Migration scripts
- Loading branch information
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
openupgrade_scripts/scripts/coupon/15.0.1.0/pre-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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")], | ||
) |
8 changes: 8 additions & 0 deletions
8
openupgrade_scripts/scripts/coupon/15.0.1.0/upgrade_analysis_work.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |