**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
""" Creates invoice related analytics and financial move lines """
        account_move = self.env['account.move']
        for inv in self:
            if not inv.journal_id.sequence_id:
                raise UserError(_('Please define sequence on the journal related to this invoice.'))
            if not inv.invoice_line_ids:
                raise UserError(_('Please create some invoice lines.'))
            if inv.move_id:
                continue
            ctx = dict(self._context, lang=inv.partner_id.lang)
            if not inv.date_invoice:
                inv.with_context(ctx).write({'date_invoice': fields.Date.context_today(self)})
            date_invoice = inv.date_invoice
            company_currency = inv.company_id.currency_id
            
            iml = inv.invoice_line_move_line_get()
            iml += inv.tax_line_move_line_get()
            diff_currency = inv.currency_id != company_currency
            
            total, total_currency, iml = inv.with_context(ctx).compute_invoice_totals(company_currency, iml)
            name = inv.name or '/'
            if inv.payment_term_id:
                totlines = inv.with_context(ctx).payment_term_id.with_context(currency_id=company_currency.id).compute(total, date_invoice)[0]
                res_amount_currency = total_currency
                ctx['date'] = date_invoice
                for i, t in enumerate(totlines):
                    if inv.currency_id != company_currency: