**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


tax_grouped = {}
        for line in self.invoice_line_ids:
            price_unit = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
            taxes = line.invoice_line_tax_ids.compute_all(price_unit, self.currency_id, line.quantity, line.product_id, self.partner_id)['taxes']
            for tax in taxes:
                val = self._prepare_tax_line_vals(line, tax)
                key = self.env['account.tax'].browse(tax['id']).get_grouping_key(val)
                if key not in tax_grouped:
                    tax_grouped[key] = val
                else:
                    tax_grouped[key]['amount'] += val['amount']
                    tax_grouped[key]['base'] += val['base']
        return tax_grouped
    @api.multi
    def register_payment(self, payment_line, writeoff_acc_id=False, writeoff_journal_id=False):
        """ Reconcile payable/receivable lines from the invoice with payment_line """
        line_to_reconcile = self.env['account.move.line']
        for inv in self:
            line_to_reconcile += inv.move_id.line_ids.filtered(lambda r: not r.reconciled and r.account_id.internal_type in ('payable', 'receivable'))
        return (line_to_reconcile + payment_line).reconcile(writeoff_acc_id, writeoff_journal_id)
    @api.v7
    def assign_outstanding_credit(self, cr, uid, id, credit_aml_id, context=None):