**Impacted versions:**
* 9.0

**Steps to reproduce:**
* Enable multi currencies
* Make sure that the current rate of a foreign currency (i.e. EUR) is not 1.0 (i.e. 0.84)
* Create a purchasable product with a cost (i.e. 33$)
* Create a vendor bill in a foreign currency (i.e. EUR)
* Add the product on the invoice

**Current behavior:**
* The unit price will be 23.28 == (33 * 0.84) * 0.84

**Expected behavior:**
* The unit price should be 27,72 == 33 * 0.84
* Probably due to this line of code: https://github.com/odoo/odoo/blob/9.0/addons/account/models/account_invoice.py#L1241

**Video/Screenshot link (optional):**
* On Runbot Community 9.0: https://www.youtube.com/watch?v=60qPmczo5vk


addons/account/models/account_invoice.py
""" Create and post an account.payment for the invoice self, which creates a journal entry that reconciles the invoice.
            :param pay_journal: journal in which the payment entry will be created
            :param pay_amount: amount of the payment to register, defaults to the residual of the invoice
            :param date: payment date, defaults to fields.Date.context_today(self)
            :param writeoff_acc: account in which to create a writeoff if pay_amount < self.residual, so that the invoice is fully paid
        """
        assert len(self) == 1, "Can only pay one invoice at a time."
        payment_type = self.type in ('out_invoice', 'in_refund') and 'inbound' or 'outbound'
        if payment_type == 'inbound':
            payment_method = self.env.ref('account.account_payment_method_manual_in')
            journal_payment_methods = pay_journal.inbound_payment_method_ids
        else:
            payment_method = self.env.ref('account.account_payment_method_manual_out')
            journal_payment_methods = pay_journal.outbound_payment_method_ids
        if payment_method not in journal_payment_methods:
            raise UserError(_('No appropriate payment method enabled on journal %s') % pay_journal.name)
        payment = self.env['account.payment'].create({
            'invoice_ids': [(6, 0, self.ids)],
            'amount': pay_amount or self.residual,
            'payment_date': date or fields.Date.context_today(self),
            'communication': self.type in ('in_invoice', 'in_refund') and self.reference or self.number,
            'partner_id': self.partner_id.id,
            'partner_type': self.type in ('out_invoice', 'out_refund') and 'customer' or 'supplier',
            'journal_id': pay_journal.id,
            'payment_type': payment_type,
            'payment_method_id': payment_method.id,
            'payment_difference_handling': writeoff_acc and 'reconcile' or 'open',
            'writeoff_account_id': writeoff_acc and writeoff_acc.id or False,
        })