'For each module (boolean fields in a res.config.installer),
check if it\'s already installed (either \'to install\', \'to upgrade\'
or \'installed\') and if it is return the module\'s record
:returns: a list of all installed modules in this installer
:rtype: recordset (collection of Record)'

def _already_installed(self):

    selectable = [name for (name, field) in self._fields.iteritems() if (field.type == 'boolean')]
    return self.env['ir.module.module'].search([('name', 'in', selectable), ('state', 'in', ['to    install', 'installed', 'to    upgrade'])])
