Skip to content

Commit

Permalink
T1177 Migrate contract_id value on move_line
Browse files Browse the repository at this point in the history
  • Loading branch information
ecino committed Mar 4, 2024
1 parent fa12537 commit be7a0a1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions recurring_contract/migrations/14.0.1.0.2/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,14 @@ def migrate(env, version):
WHERE m.old_invoice_id = rel.account_invoice_id;
""",
)
# Restore contract_id value on move lines
openupgrade.logged_query(
env.cr,
"""
update account_move_line m
set contract_id=i.contract_id
from account_invoice_line i
where m.contract_id is null and old_invoice_line_id = i.id
and i.contract_id is not null;
""",
)

0 comments on commit be7a0a1

Please sign in to comment.