OCA / account-reconcile

Odoo account reconciliation modules (statements, data completion...)
https://odoo-community.org/psc-teams/banking-10
GNU Affero General Public License v3.0
127 stars 369 forks source link

[IMP] account_reconcile_oca: Fix multicurrency journal management #668

Open etobella opened 1 month ago

etobella commented 1 month ago

The main idea of this commit is to show the right currency amount

Should fix #656

@alexis-via

etobella commented 1 month ago

@PaulGoubert

etobella commented 1 month ago

If we can have the exact detail, I can construct the test in order to avoid future regressions :wink:

etobella commented 1 month ago

@alexis-via @PaulGoubert Can you test again? I made a lot of changes in order to change all the stuff, but tests are passing and I added a new test with your case (I would like to add some more in order to ensure that all works fine)

josselin-arica commented 3 weeks ago

Hola, se esta presentando una observación ya que al momento de conciliar no esta trayendo el importe en moneda, les pasa lo mismo?

etobella commented 3 weeks ago

@josselin-arica there is a lot of people in this conversation that doesn't speak Spanish. Only on the localization repos you could do that.

Can you send a complete flow of your problem in order to see what happens? You should test in the runbot in order to ensure that it is not a problem of your installation

josselin-arica commented 3 weeks ago

Hola estoy probando el módulo en una base nativa (test) y sucede lo siguiente:

  1. He creado un diario con moneda USD
  2. He creado una cuenta en USD para que actúe como contrapartida a la hora de conciliar.
  3. Al momento de conciliar en diario USD creado, y elegir esta cuenta me aparece un mensaje "La cuenta seleccionada en tu asiento diario obliga a proporcionar una moneda secundaria. Debes eliminar la moneda secundaria de la cuenta"
  4. Ese mensaje me aparece siempre que use USD, sin embargo en caso logre conciliar ya que es un mensaje espontaneo, cuando ingreso al asiento contable de la conciliación, en la columna importe en moneda (que esta oculta) no trae el importe. Les pasa lo mismo?
etobella commented 3 weeks ago

@josselin-arica in english please. The first time I answered and explained that you should ask and comment in english.

josselin-arica commented 3 weeks ago

Hello, I am testing the module on a native basis (test) and the following happens:

I have created a journal with USD currency I have created an account in USD to act as a counterparty when reconciling. When I reconcile in the USD journal created, and choose this account, I get a message "The account selected in your journal entry requires you to provide a secondary currency. You must delete the secondary currency from the account" This message appears whenever I use USD, however, if I manage to reconcile since it is a spontaneous message, when I enter the reconciliation accounting entry, in the currency amount column (which is hidden) it does not show the currency amount.

Does the same thing happen to you?

etobella commented 3 weeks ago

Did you test this PR or the latest merged version? @josselin-arica

etobella commented 2 weeks ago

Well, I needed to do a lot of changes in order to make it work properly.

The main issues is that Odoo was already calculating the exchange rate and this was confusing (also, Odoo ignores the rate we set in order to compute it). I solved it by keeping the logic from Odoo

@legalsylvain @PaulGoubert

PaulGoubert commented 2 weeks ago

Well, I needed to do a lot of changes in order to make it work properly.

The main issues is that Odoo was already calculating the exchange rate and this was confusing (also, Odoo ignores the rate we set in order to compute it). I solved it by keeping the logic from Odoo

@legalsylvain @PaulGoubert

@alexis-via

alexis-via commented 1 week ago

I tested the scenario described in my bug report and it now works well ! Thank you @etobella !

I continued with a similar multi-currency scenario and I found another problem. Here is the detailed scenario:

1) I have a company with currency = EUR 2) I create a bank journal in currency USD 3) On the USD currency, I create 3 different rates:

bug42

The problem is that I still have the line in the Bank suspense account of 0,01 €.

etobella commented 1 week ago

The same happens with EE image

This probably comes from differences of decimals when transforming from USD to EUR and EUR to USD... IMO this case implies that the user needs to define the difference manually

etobella commented 4 days ago

@alexis-via If you approve it, we can proceed with merge and I will port it to 17 :wink: