invoices = self.env['account.invoice'].search(
            domain + [('type', 'in', ['in_invoice', 'out_invoice'])])