qdp-odoo 8f5e137df7 [FIX] account: cash basis entry rate in multi-currencies
Flow:
- Make an invoice in foreign currency with a given rate
- Register a payment for that invoice, in company currency, worth the invoice amount_residual but with a different rate
=> The cash basis entry was wrongly taking a rate of 1 to make the conversion between the amount in foreign currency and the company currency (see new test)
=> Additionally, the amounts to report on the tax report should always be equal to the ones from the original invoice when it's fully paid. Some tests were wrong in that regard.

In order to fix the issue, the way the cash basis is handling the percentage and the way used to fix all rounding issues at the generation of the exchange difference entry is different:
=> The condition triggering the exchange difference items for the cash basis entry is now handling correctly the case when the payment is made using another currency but the amount in company currency is fully paying the invoice.
=> The complexe method '_fix_cash_basis_full_balance_coverage' defined in order to manage rounding issues on the tax report when the invoice becomes fully paid is no longer necessary since the balance of each account (base + tax account) is automatically fixed by the extra journal items added to the exchange difference.
Indeed, after the generation of the exchange difference journal entry:
- the balance of tax transfer account is now reset to zero.
- the balance of the tax account is exactly the balance of the tax transfer account defined on the invoice.
- the journal items containing the tax base amount is exactly equals to the balance of the invoice lines.

closes odoo/odoo#65939

X-original-commit: 6db073e8f1865991b79b5b31b4a4a77158aa0d15
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-02-11 10:31:09 +00:00
2020-04-20 11:41:39 +00:00
…
…
…
…
2019-11-08 11:24:04 +00:00
2020-09-28 14:07:25 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%