Skip to content

Commit da03561

Browse files
committed
[FIX] loyalty: incomplete migration
1 parent 8d7c9f4 commit da03561

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

docsource/modules180-190.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ Module coverage 18.0 -> 19.0
698698
+---------------------------------------------------+----------------------+-------------------------------------------------+
699699
| link_tracker | |No DB layout changes. |
700700
+---------------------------------------------------+----------------------+-------------------------------------------------+
701-
| loyalty | | |
701+
| loyalty |Done | |
702702
+---------------------------------------------------+----------------------+-------------------------------------------------+
703703
| lunch | | |
704704
+---------------------------------------------------+----------------------+-------------------------------------------------+
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
from openupgradelib import openupgrade
22

33

4-
@openupgrade.migrate()
5-
def migrate(env, version):
4+
def fix_template_lang(env):
65
"""Reset "lang" field for these records, as they were set in previous
76
version in XML, but not in this one, and Odoo doesn't reset non present
87
fields.
8+
The templates are not marked as noupdate, so this change is not caught by
9+
upgrade_analysis
910
"""
1011
for xmlid in ("mail_template_gift_card", "mail_template_loyalty_card"):
1112
template = env.ref(f"loyalty.{xmlid}", False)
1213
if template:
1314
template.lang = False
15+
16+
17+
@openupgrade.migrate()
18+
def migrate(env, version):
19+
openupgrade.load_data(env, "loyalty", "19.0.1.0/noupdate_changes.xml")
20+
fix_template_lang(env)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---Models in module 'loyalty'---
2+
---Fields in module 'loyalty'---
3+
loyalty / loyalty.reward / tax_ids (many2many) : DEL relation: account.tax
4+
5+
# NOTHING TO DO
6+
7+
---XML records in module 'loyalty'---

0 commit comments

Comments
 (0)