Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX][14.0] account: fill missing ref (memo) to move of payment #599

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions openupgrade_scripts/scripts/account/14.0.1.1/post-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,18 @@ def pass_payment_to_journal_entry_narration(env):
)


def fill_ref_of_payment_move(env):
openupgrade.logged_query(
env.cr,
"""
UPDATE account_move am
SET ref = ap.communication
FROM account_payment ap
WHERE ap.move_id = am.id AND char_length(COALESCE(ap.communication, '')) > 0
""",
)


def fill_company_account_cash_basis_base_account_id(env):
openupgrade.logged_query(
env.cr,
Expand Down Expand Up @@ -882,3 +894,4 @@ def migrate(env, version):
_migrate_currency_exchange_account_company(env)
_create_ir_config_parameter_constraint_start_date(env)
_switch_default_account_and_outstanding_account(env)
fill_ref_of_payment_move(env)
Loading