Skip to content

Commit 8050997

Browse files
committed
[FIX] account_payment_pro_receiptbook: Update receiptbook_id in account_move table
1 parent f3fd78e commit 8050997

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

account_payment_pro_receiptbook/17.0.0.0/post-migration.py

+10
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ def migrate_payment_grup_data(env):
2424
"""
2525
openupgrade.logged_query(env.cr, query)
2626

27+
query = """
28+
update account_move am set
29+
receiptbook_id = ap.receiptbook_id
30+
from account_payment as ap
31+
where
32+
am.payment_id = ap.id and ap.receiptbook_id is not null;
33+
"""
34+
35+
openupgrade.logged_query(env.cr, query)
36+
2737
# popular to_pay_move_lines (m2m field, en post)
2838
query = """
2939
insert into account_move_line_payment_to_pay_rel (to_pay_line_id, payment_id)

0 commit comments

Comments
 (0)