forked from OCA/OpenUpgrade
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OU-FIX] digest: Load upstream latest template
As the template is constantly changing upstream: https://github.com/odoo/odoo/commits/16.0/addons/digest/data/digest_data.xml keeping a copy here and loading it is not practical and can lead to errors, like the one that triggers this PR, having an inheritance in mass_mailing that crashes due to obsolete content. Thus, the best strategy is to switch to noupdate=0 before updating contents, and then restore it to noupdate.
- Loading branch information
1 parent
6ed0075
commit da1b868
Showing
3 changed files
with
15 additions
and
2 deletions.
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
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
10 changes: 10 additions & 0 deletions
10
openupgrade_scripts/scripts/digest/16.0.1.1/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,10 @@ | ||
# Copyright 2024 Tecnativa - Pedro M. Baeza | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from openupgradelib import openupgrade | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
# Switch to noupdate=0 for getting the current v16 arch, for switching in post again | ||
openupgrade.set_xml_ids_noupdate_value(env, "digest", ["digest_mail_layout"], False) |