[FIX] account: invoice/payment reconciliation with a change of rate
[FIX] account: invoice/payment reconciliation with a change of rate

The amount of the invoice in the payment currency was wrongly
computed when a change of rate in the invoice currency occured between
the invoice date and the payment date,
when the invoice currency was neither the company currency
nor the payment currency.

e.g.
Company in USD. Exchange rates:

    07/02   08/02
HKD 7.0     8.0
EUR 0.90    0.94

Invoice: 100,000 HKD, date 07/02, worthing 100,000 / 7 = 14285,71 USD
Payment: 13000 EUR, date 08/02, worthing 13000 / 0,94 = 13829,79 USD

The invoice amount within the invoice currency was computed:
100,000 / 8 * 0.94 = 11750€
While the invoice, at the time of the invoice date, worth actually
14285.71 * 0.94 = 13428,57€

When the invoice, payment and companies are all different,
the invoice amount in the payment currency must not be computed from
the amount in the invoice currency computed at the invoice date
to the payment currency, since the rate of the invoice currency
changed, and the amount in the invoice currency at the time
is no longer the same today.

In simple words, `amount_currency` of the invoice
was computed using the 7.0 rate
e.g. 100,000 / 7 = 14285,71
while, when the rate changes, computing from the invoice currency to
the payment currency, which are both different than the company currency
it will first convert the amount to the company currency, using the new rate:
e.g. 100,000 / 8 = 12500€
and then convert to the payment currency:
e.g. 12500 * 0.94 = 11750€

opw-640248

bplancher/odoo,dfang/odoo,Elico-Corp/odoo_OCB,hip-odoo/odoo,Elico-Corp/odoo_OCB,ygol/odoo,Elico-Corp/odoo_OCB,dfang/odoo,bplancher/odoo,bplancher/odoo,laslabs/odoo,dfang/odoo,hip-odoo/odoo,Elico-Corp/odoo_OCB,hip-odoo/odoo,laslabs/odoo,dfang/odoo,hip-odoo/odoo,hip-odoo/odoo,laslabs/odoo,hip-odoo/odoo,ygol/odoo,ygol/odoo,ygol/odoo,dfang/odoo,Elico-Corp/odoo_OCB,laslabs/odoo,laslabs/odoo,ygol/odoo,bplancher/odoo,dfang/odoo,ygol/odoo,bplancher/odoo,laslabs/odoo,bplancher/odoo,Elico-Corp/odoo_OCB,ygol/odoo