Skip to content

Commit 2f96c23

Browse files
committed
[OU-FIX] repair: copy repair_order.state column before updating its data
This will also avoid an error log by using `map_values` with the same source and target.
1 parent 8b4d2ea commit 2f96c23

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

openupgrade_scripts/scripts/repair/15.0.1.0/post-migration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def migrate(env, version):
1414
)
1515
openupgrade.map_values(
1616
env.cr,
17-
"state",
17+
openupgrade.get_legacy_name("state"),
1818
"state",
1919
[("invoice_except", "2binvoiced")],
2020
table="repair_order",

openupgrade_scripts/scripts/repair/15.0.1.0/pre-migration.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ def migrate(env, version):
1212
openupgrade.convert_field_to_html(
1313
env.cr, "repair_order", "quotation_notes", "quotation_notes"
1414
)
15+
openupgrade.copy_columns(
16+
env.cr,
17+
{"repair_order": [("state", None, None)]},
18+
)

0 commit comments

Comments
 (0)