'selects all modules to install:
* checked boolean fields
* return values of hook methods. Hook methods are of the form
``_if_%(addon_name)s``, and are called if the corresponding
addon is marked for installation. They take the arguments
cr, uid, ids and context, and return an iterable of addon
names
* additionals, additionals are setup through the ``_install_if``
class variable. ``_install_if`` is a dict of {iterable:iterable}
where key and value are iterables of addon names.
If all the addons in the key are selected for installation
(warning: addons added through hooks don\'t count), then the
addons in the value are added to the set of modules to install
* not already installed'

def modules_to_install(self):

    base = set((module_name for installer in self.read() for (module_name, to_install) in installer.iteritems() if ((self._fields[module_name].type == 'boolean') and to_install)))
    hooks_results = set()
    for module in base:
        hook = getattr(self, ('_if_%s' % module), None)
        if hook:
            hooks_results.update((hook() or set()))
    additionals = set((module for (requirements, consequences) in self._install_if.iteritems() if base.issuperset(requirements) for module in consequences))
    return (((base | hooks_results) | additionals) - set(self.already_installed()))
