Impacted versions:

10.0

Steps to reproduce:

See  https://youtu.be/I3Qb3m1GmJ4

Current behavior:

Currency mixing in expense sheet view and report

Expected behavior:

Have no currency mixing :smile: 

Video/Screenshot link (optional):

See https://youtu.be/I3Qb3m1GmJ4

Credit : @alexis-via - Barcelona OCA code sprint


addons/hr_expense/models/hr_expense.py
account_move = []
        for expense in self:
            move_line = expense._prepare_move_line_value()
            account_move.append(move_line)
            
            taxes = expense.tax_ids.compute_all(expense.unit_amount, expense.currency_id, expense.quantity, expense.product_id)
            account_move[-1]['price'] = taxes['total_excluded']
            account_move[-1]['tax_ids'] = [(6, 0, expense.tax_ids.ids)]
            for tax in taxes['taxes']:
                account_move.append({
                    'type': 'tax',
                    'name': tax['name'],
                    'price_unit': tax['amount'],
                    'quantity': 1,
                    'price': tax['amount'],
                    'account_id': tax['account_id'] or move_line['account_id'],
                    'tax_line_id': tax['id'],
                })
        return account_move
    @api.multi
    def action_get_attachment_view(self):
        self.ensure_one()
        res = self.env['ir.actions.act_window'].for_xml_id('base', 'action_attachment')
        res['domain'] = [('res_model', '=', 'hr.expense'), ('res_id', 'in', self.ids)]
        res['context'] = {'default_res_model': 'hr.expense', 'default_res_id': self.id}
        return res
    @api.model
    def get_empty_list_help(self, help_message):