8000 [FIX] account: fallback to correct move link in bank matching by alialfie · Pull Request #207968 · odoo/odoo · GitHub
[go: up one dir, main page]

Skip to content

[FIX] account: fallback to correct move link in bank matching #207968

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

Closed

Conversation

alialfie
Copy link
Contributor
@alialfie alialfie commented Apr 29, 2025

When reconciling an invoice and payment in foreign currency on different dates, an exchange rate difference line is added. This results in more than one value in reconciled_lines_ids, and moveData() no longer resolves a link to the move, so the bank statement is shown instead.

This commit introduces a non-stored computed field to filter out exchange difference lines from reconciled_lines_ids. The kanban now uses this filtered field as a fallback when the reconciled lines are ambiguous.

Steps to reproduce:

  1. Enable a foreign currency and create two rates on different dates.
  2. Create an invoice on one of the dates and a transaction to pay it on the other.
  3. Reconcile them.

task-4749264

@robodoo
Copy link
Contributor
robodoo commented Apr 29, 2025

Pull request status dashboard

@C3POdoo C3POdoo added the RD research & development, internal work label Apr 29, 2025
@alialfie alialfie force-pushed the saas-18.3-bank_rec_xch_diff-alal branch from 19bc91b to 6459ca4 Compare April 30, 2025 08:20
@alialfie alialfie changed the title [FIX] account{_accountant}: incorrect link to invoice in rec widget [FIX] account{_accountant}: fallback to correct move link in bank matching Apr 30, 2025
@alialfie alialfie requested a review from FlorianGilbert April 30, 2025 08:22
Copy link
Contributor
@malb-odoo malb-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thankssss for the pr

@alialfie alialfie force-pushed the saas-18.3-bank_rec_xch_diff-alal branch from 6459ca4 to e7e0176 Compare May 6, 2025 12:45
@alialfie alialfie requested a review from malb-odoo May 6, 2025 12:45
@alialfie alialfie force-pushed the saas-18.3-bank_rec_xch_diff-alal branch from e7e0176 to 7ac1d2b Compare May 8, 2025 12:48
@alialfie alialfie requested a review from malb-odoo May 8, 2025 12:48
@alialfie alialfie force-pushed the saas-18.3-bank_rec_xch_diff-alal branch 3 times, most recently from 34f0b7d to 734e928 Compare May 14, 2025 10:10
When reconciling an invoice and payment in foreign currency on different
dates, an exchange rate difference line is added. This results in more
than one value in `reconciled_lines_ids`, and `moveData()` no longer
resolves a link to the move, so the bank statement is shown instead.

This commit introduces a non-stored computed field to filter out
exchange difference lines from `reconciled_lines_ids`. The kanban now
uses this filtered field as a fallback when the reconciled lines are
ambiguous.

Steps to reproduce:
1. Enable a foreign currency and create two rates on different dates.
2. Create an invoice on one of the dates and a transaction to pay it on
the other.
3. Reconcile them.

task-4749264
@alialfie alialfie force-pushed the saas-18.3-bank_rec_xch_diff-alal branch from 734e928 to ff7bcf1 Compare May 16, 2025 07:48
@alialfie alialfie changed the title [FIX] account{_accountant}: fallback to correct move link in bank matching [FIX] account: fallback to correct move link in bank matching May 16, 2025
Copy link
Contributor
@malb-odoo malb-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanksss

@C3POdoo
Copy link
Contributor
C3POdoo commented May 16, 2025

Upgrade exception #573 added.

Waiting the forward-port of this PR, the exception will be applied on all builds, and create an inconsistent state for migrations.

Important

Please forward port this PR ASAP up to master without change, preferably before the end of the week.

PRs adding fields/models should be merged at the beginning of the week and all the forward ports should be merged in the same week.

If you need to apply any change before it reaches master, please notify runbot team.

Details:

field:account.move.line.reconciled_lines_excluding_exchange_diff_ids

cc @KangOl @nseinlet @aj-fuentes

8000

@malb-odoo
Copy link
Contributor

@robodoo r+

@robodoo
Copy link
Contributor
robodoo commented May 16, 2025

@malb-odoo you may want to rebuild or fix this PR as it has failed CI.

robodoo pushed a commit that referenced this pull request May 17, 2025
When reconciling an invoice and payment in foreign currency on different
dates, an exchange rate difference line is added. This results in more
than one value in `reconciled_lines_ids`, and `moveData()` no longer
resolves a link to the move, so the bank statement is shown instead.

This commit introduces a non-stored computed field to filter out
exchange difference lines from `reconciled_lines_ids`. The kanban now
uses this filtered field as a fallback when the reconciled lines are
ambiguous.

Steps to reproduce:
1. Enable a foreign currency and create two rates on different dates.
2. Create an invoice on one of the dates and a transaction to pay it on
the other.
3. Reconcile them.

task-4749264

closes #207968

Related: odoo/enterprise#84424
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
@robodoo robodoo closed this May 17, 2025
@fw-bot fw-bot deleted the saas-18.3-bank_rec_xch_diff-alal branch May 24, 2025 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0