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


""" Update form view id of action to open the invoice """
        if self.type in ('in_invoice', 'in_refund'):
            return self.env.ref('account.invoice_supplier_form').id
        else:
            return self.env.ref('account.invoice_form').id
    def _prepare_tax_line_vals(self, line, tax):
        """ Prepare values to create an account.invoice.tax line
        The line parameter is an account.invoice.line, and the
        tax parameter is the output of account.tax.compute_all().
        """
        vals = {
            'invoice_id': self.id,
            'name': tax['name'],
            'tax_id': tax['id'],
            'amount': tax['amount'],
            'base': tax['base'],
            'manual': False,
            'sequence': tax['sequence'],
            'account_analytic_id': tax['analytic'] and line.account_analytic_id.id or False,
            'account_id': self.type in ('out_invoice', 'in_invoice') and (tax['account_id'] or line.account_id.id) or (tax['refund_account_id'] or line.account_id.id),
        }
        
        
        
        
        if not vals.get('account_analytic_id') and line.account_analytic_id and vals['account_id'] == line.account_id.id:
            vals['account_analytic_id'] = line.account_analytic_id.id
        return vals
    @api.multi
    def get_taxes_values(self):