Wednesday, April 6, 2022
2 changes · master
Enhancements to existing features
Odoo now handles payments and invoices in different currencies more accurately during reconciliation. This keeps exchange-rate differences visible as payments are matched, helping invoices close correctly and supporting local reporting requirements such as payment EDI in Mexico.
Original PR description
==== PURPOSE ==== The current reconciliation is made to support two distinct kind of reconciliation: 1) Everything is expressed in foreign currency, then perform the reconciliation using this…
==== PURPOSE ==== The current reconciliation is made to support two distinct kind of reconciliation: 1) Everything is expressed in foreign currency, then perform the reconciliation using this currency: Suppose EUR is the foreign currency and USD is the company currency. Reconciling: L1: 120 EUR 60 USD (rate 2:1) L2: 240 EUR 80 USD (rate 3:1) ..leads to a partial of 120 EUR and min(80, 60) = 60 USD After the reconciliation, L1 is fully matched but L2 is still open with 120 EUR but only 20 USD. This is the first problem is the current reconciliation because L2 is supposed to have a rate 3:1 so the residual amount should be 120 / 3 = 40 USD. Since the rate is no longer consistent on L2, the user will probably close the reconciliation by using another line in EUR or will close manually the reconciliation with 20 USD but without any additional exchange difference journal items explaining where this unconsistency comes from. 2) Is the current lines are mixing multiple currencies, the reconciliation is made using the company's currency. In some countries like Mexico, Ethiopia or Costa Rica, the customer is free to pay an invoice using the company's currency instead of the foreign one. So, suppose USD is the foreign currency and MXN is the company currency. The invoice is expressed by: L1: 120 USD 60 MXN (rate 2:1) Is the customer is paying at a date in which the rate is 3:1, he is free to pay either L2: 120 USD 40 MXN (rate 3:1), either L2: 40 MXN. In the second case, he is expecting the invoice to be fully paid because its paiement is equivalent to 120 USD at the payment date. In Odoo, the second case leads to an open balance of 20 MXN and the invoice is not completely paid. Even this situation could be easily fixed by a manual write-off, this makes the Mexican payment EDI very complicated to fullfil correctly because the government is expecting a complete matching between the invoice and the payment. When the customer is paying multiple invoices or the invoices are paid using multiple payments, the currently generated EDI file in Odoo is wrong. ==== IMPLEMENTATION ==== An exchange difference journal entry could be now created directly at each partial to ensure the rate between amount_residual_currency and amount_residual. Also, when reconciling two lines, one with a foreign currency and one expressed in company currency, the reconciliation is made in foreign currency. github issue: https://github.com/odoo/odoo/issues/37469 task: 2669371 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Odoo now handles invoice and payment reconciliation more accurately when foreign currencies and company currencies are mixed. This reduces manual corrections, keeps exchange differences properly recorded, and helps ensure compliant payment reporting in countries such as Mexico.
Original PR description
==== PURPOSE ==== The current reconciliation is made to support two distinct kind of reconciliation: Everything is expressed in foreign currency, then perform the reconciliation using this currency:…
==== PURPOSE ==== The current reconciliation is made to support two distinct kind of reconciliation: Everything is expressed in foreign currency, then perform the reconciliation using this currency: Suppose EUR is the foreign currency and USD is the company currency. Reconciling: L1: 120 EUR 60 USD (rate 2:1) L2: 240 EUR 80 USD (rate 3:1) ..leads to a partial of 120 EUR and min(80, 60) = 60 USD After the reconciliation, L1 is fully matched but L2 is still open with 120 EUR but only 20 USD. This is the first problem is the current reconciliation because L2 is supposed to have a rate 3:1 so the residual amount should be 120 / 3 = 40 USD. Since the rate is no longer consistent on L2, the user will probably close the reconciliation by using another line in EUR or will close manually the reconciliation with 20 USD but without any additional exchange difference journal items explaining where this unconsistency comes from. Is the current lines are mixing multiple currencies, the reconciliation is made using the company's currency. In some countries like Mexico, Ethiopia or Costa Rica, the customer is free to pay an invoice using the company's currency instead of the foreign one. So, suppose USD is the foreign currency and MXN is the company currency. The invoice is expressed by: L1: 120 USD 60 MXN (rate 2:1) Is the customer is paying at a date in which the rate is 3:1, he is free to pay either L2: 120 USD 40 MXN (rate 3:1), either L2: 40 MXN. In the second case, he is expecting the invoice to be fully paid because its paiement is equivalent to 120 USD at the payment date. In Odoo, the second case leads to an open balance of 20 MXN and the invoice is not completely paid. Even this situation could be easily fixed by a manual write-off, this makes the Mexican payment EDI very complicated to fullfil correctly because the government is expecting a complete matching between the invoice and the payment. When the customer is paying multiple invoices or the invoices are paid using multiple payments, the currently generated EDI file in Odoo is wrong. ==== IMPLEMENTATION ==== An exchange difference journal entry could be now created directly at each partial to ensure the rate between amount_residual_currency and amount_residual. Also, when reconciling two lines, one with a foreign currency and one expressed in company currency, the reconciliation is made in foreign currency. github issue: https://github.com/odoo/odoo/issues/37469 task: 2669371