Skip to content

Commit

Permalink
[OU-FIX] digest: Finish migration scripts
Browse files Browse the repository at this point in the history
- load_data should be done on post, as the record may be deleted on 16,
  and then the new record creation will fail due to missing required
  fields.
- We have to reset translations for the template that has changed to
  have the new definition for other languages than `en_US`.
  • Loading branch information
pedrobaeza committed Nov 7, 2024
1 parent 3c2d29a commit d132a0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 9 additions & 0 deletions openupgrade_scripts/scripts/digest/17.0.1.1/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright 2024 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(env, "digest", "17.0.1.1/noupdate_changes.xml")
openupgrade.delete_record_translations(env.cr, "digest", ["digest_mail_layout"])
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(env, "digest", "17.0.1.1/noupdate_changes.xml")
openupgrade.set_xml_ids_noupdate_value(
env,
"digest",
Expand Down

0 comments on commit d132a0d

Please sign in to comment.