Skip to content

Commit 3d192b6

Browse files
committed
[IMP] sale_stock: As we renamed the column, computation is launched
1 parent 6472e14 commit 3d192b6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,12 @@
44
@openupgrade.migrate()
55
def migrate(env, version):
66
openupgrade.rename_columns(env.cr, {"sale_order": [("effective_date", None)]})
7+
# We need to recreate the column in order to avoid computation of the field.
8+
# It will be filled on post-migration.
9+
openupgrade.logged_query(
10+
env.cr,
11+
"""
12+
ALTER TABLE sale_order
13+
ADD COLUMN effective_date timestamp
14+
""",
15+
)

0 commit comments

Comments
 (0)