Jorge Pinna Puissant 1c3d1eed01 [FIX] account: avoid convert amount in currency into debit/credit in a reverse entry
- Create an account in foreign currency;
- Create different currency rates for the foreign currency at different
    dates;
- Create a journal entry at past date X with 2 lines, and use the
    "foreign currency account" for one of the lines, but a domestic
    currency account for the other;
- Now try to reverse the entry at a later date with a different exchange
    rate (select an appropriate date in the wizard).

Before this commit, an error was raise because the move is not balanced.
This issue occurs because the 'amount_currency' value is used to
recompute the debit/credit value based on original currency rate. But
the _onchange_currency function is also called, and it recomputes the
credit/debit for the foreign currency line with the  exchange rate of
the date of the reverse entry.

This commit is a fine-tuning of ae3d7aeb706dc1bc3216fd63c6a943e5d9cb56e7
to avoid recomputing credit/debit in a reverse entry.

opw-2227098

closes odoo/odoo#48609

X-original-commit: 748b2bcb3950840d815040684f72802c968240f2
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-03-30 12:33:13 +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%