Skip to content

Commit

Permalink
[FIX] account: Fix bug invoice data wrong when migrate 13.0 to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JocelynVN committed Sep 22, 2022
1 parent 6aaff94 commit 11fe6ad
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions openupgrade_scripts/scripts/account/14.0.1.1/end-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ def _make_correct_account_type(env):
)


def _recompute_amount_residual(env):
account_move_lines_to_recompute = env['account.move.line'].search([
('parent_state', '=', 'posted'),
('move_id.payment_state', 'in', ['not_paid', 'in_payment', 'partial'])])
account_move_lines_to_recompute._compute_amount_residual()


@openupgrade.migrate()
def migrate(env, version):
_recompute_amount_residual(env)
_make_correct_account_type(env)

0 comments on commit 11fe6ad

Please sign in to comment.