Merge pull request #1387 from odoo-dev/master-disable-subcommand-discovery-fme
authorFabien Meghazi <agr@amigrave.com>
Fri, 25 Jul 2014 15:30:16 +0000 (17:30 +0200)
committerFabien Meghazi <agr@amigrave.com>
Fri, 25 Jul 2014 15:30:16 +0000 (17:30 +0200)
commit24bff2e8b7aff1b7fab52ede05a38b11e984d87d
treecf5de2c4f6273fbe2441e76b7f704008e63553fd
parent091394737af6a8c68ec3128174b78676669eb889
parent01ef188a7b30f964f84adb5e0ce7f1d614eb882f
Merge pull request #1387 from odoo-dev/master-disable-subcommand-discovery-fme

[FIX] Temporary disable addons subcommand auto discovery

The problem with the current approach is that it imports all modules in
order to discover which one exposes a subcommand by subclassing
openerp.cli.Command. At that time, the arguments are not parsed in order
to setup the config because a subcommand could potentialy alter the
command line arguments (which is the case of start)

This behavior causes the modules to be imported with the default config and all
the modules using some config keys at startup won't have to value they
are supposed to have when considering the shared command line switches.

Long story short:

$ odoo --workers=6

is ok, but

$ odoo start --workers=6

is not for code that checks the config value at startup (eg: report module)

As the automatic subcommands are not used yet, we temporary disable it
until as proper solution is found.