Skip to content

Commit

Permalink
[FIX] account: reversed_entry_id migration was reversed
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Jul 28, 2024
1 parent 39543a8 commit aabdb35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions addons/account/migrations/13.0.1.1/post-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,10 +585,9 @@ def fill_account_move_reversed_entry_id(env):
env.cr, """
UPDATE account_move am
SET reversed_entry_id = am2.id
FROM account_invoice ai
JOIN account_invoice ai2 ON ai.refund_invoice_id = ai2.id
JOIN account_move am2 ON am2.old_invoice_id = ai2.id
WHERE am.reversed_entry_id IS NULL AND am.old_invoice_id = ai.id"""
FROM account_move am2
WHERE am.reversed_entry_id IS NULL AND am2.reverse_entry_id = am.id
"""
)


Expand Down
1 change: 0 additions & 1 deletion addons/account/migrations/13.0.1.1/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

_field_renames = [
('account.move', 'account_move', 'amount', 'amount_total'),
('account.move', 'account_move', 'reverse_entry_id', 'reversed_entry_id'),
]

_field_sale_renames = [
Expand Down

0 comments on commit aabdb35

Please sign in to comment.