-
-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OU-ADD] website_profile: Migration to 16.0
TT45247
- Loading branch information
1 parent
fba2cde
commit 4a80825
Showing
3 changed files
with
31 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
24 changes: 24 additions & 0 deletions
24
openupgrade_scripts/scripts/website_profile/16.0.1.0/post-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,24 @@ | ||
# Copyright 2023 Tecnativa - Víctor Martínez | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openupgradelib import openupgrade | ||
|
||
_translations_to_delete = [ | ||
"name", | ||
"description", | ||
] | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.delete_records_safely_by_xml_id( | ||
env, | ||
[ | ||
"website_profile.gamification_karma_rank_access_website_publisher", | ||
], | ||
) | ||
openupgrade.load_data( | ||
env.cr, "website_profile", "migrations/16.0.1.0/noupdate_changes.xml" | ||
) | ||
openupgrade.delete_record_translations( | ||
env.cr, "website_profile", _translations_to_delete | ||
) |
6 changes: 6 additions & 0 deletions
6
openupgrade_scripts/scripts/website_profile/16.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,6 @@ | ||
---Models in module 'website_profile'--- | ||
---Fields in module 'website_profile'--- | ||
---XML records in module 'website_profile'--- | ||
NEW ir.model.access: website_profile.gamification_karma_rank_access_restricted_editor | ||
DEL ir.model.access: website_profile.gamification_karma_rank_access_website_publisher | ||
# DONE: post-migration (delete record) |