Overpayment with different currency

When we try to make an overpayment of an invoice, we can’t do it if is different company’s currency, it shows you this message "Payment lines amount on invoice “9” can not be greater than the invoice amount. "

For example, we have an invoice with Total: 1.500€ and the company’s currency is $, some days later you have a superior amount because of rates, now you have 1.501€ (you have an overpayment) when you try to do it the system don’t allow it showing that warning.

When the system tries to do the account move, the payment lines are in the company’s currency, and when tries to do the move, it can’t because of the amount of payment lines is higher when do the currency exchange.

What’s is the funtion of overpayment then?

Normally it should be managed since Issue 9070: Allow overpay invoice with write-off - Tryton issue tracker

We tried to do it in the demo and it doesn’t work either. When we use the overpayment wizard to pay an invoice with a different currency than the company currency, Tryton does not allow it, due to the difference in exchange rates there is a difference between the payment lines and the invoice amount. We have seen that the problem is in the check_payment_lines.

I do not think so. This check is correct.

I do not understand. The overpayment is there for this case as overpayment is computed as amount_invoice - invoice.amount_to_pay.