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

[17.0] Partner not populated in Account Movements despite correct Reconciliation Model mapping #781

Open
misterx opened this issue Jan 19, 2025 · 1 comment · May be fixed by #800
Open
Labels

Comments

@misterx
Copy link

misterx commented Jan 19, 2025

Module

account_reconcile_oca, account_statement_import_sheet_file

Describe the bug

When reconciling a bank statement line with a Reconciliation Model that includes Partner Mapping, the Partner field in the Account Movements section remains empty, despite the AccountBankStatementLine._retrieve_partner() method returning the correct partner.

To Reproduce

Affected versions: Odoo CE 17 (Docker Version)

Steps to reproduce the behavior:

  1. Create a new Reconciliation Model with the following parameters:
    • Type: Rule to suggest counterpart entry
    • Label Contains: DEADBEAF
    • Counterparty entries:
      • Account: 100000
      • Amount type: Percentage of balance
      • Amount: 100
    • Partner mapping:
      • Company: My Company
      • Find text in label: .*
      • Partner: My Vendor
  2. Create a Bank Statement Line with the following details:
    • Amount: 1000
    • Label: DEADBEAF
    • Partner: leave empty
  3. Open the bank statement line in Kanban view (under account.bank.statement.line) and inspect the reconciliation data.

Expected Result

  • The reconciliation data should display:
    • The correct Account Movements as configured in the Reconciliation Model.
    • The Partner field in the Account Movements should be populated with the value My Vendor based on the Reconciliation Model.

Actual Result

  • The reconciliation data shows:
    • The Account Movements are correctly populated as per the Reconciliation Model.
    • The Partner field in the Account Movements is empty, even though the AccountBankStatementLine._retrieve_partner() method returns the correct partner.

Additional context

  • The issue occurs in Odoo CE 17 (Docker Version).
  • Analyzing the code reveals that AccountBankStatementLine._retrieve_partner() correctly returns the expected partner, but the value is not assigned to the Partner field in the reconciliation data.

I am unable to determine how to fix this issue because I do not know the correct place to assign the partner value returned by self._retrieve_partner(). As I am new to Odoo, I would appreciate guidance on where this assignment should be made to ensure it aligns with Odoo's best practices and the intended behavior.

@misterx misterx added the bug label Jan 19, 2025
@misterx misterx changed the title [17] Partner not populated in Account Movements despite correct Reconciliation Model mapping [17.0] Partner not populated in Account Movements despite correct Reconciliation Model mapping Jan 19, 2025
@Peluko
Copy link

Peluko commented Feb 5, 2025

Hello. I've submited a pull request with the solution that is working for me. I'm figuring how OCA tests works to write the necessary tests for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment