Skip to content
Snippets Groups Projects
Commit d9def2c4 authored by Fabien Meghazi's avatar Fabien Meghazi
Browse files

Simplify odoo start. Make it work everywhere

parent fa4ed55d
Branches
Tags
No related merge requests found
......@@ -43,9 +43,8 @@ class Start(Command):
# check if one of the subfolders has at least one module
mods = self.get_module_list(project_path)
if not mods:
die("Directory `%s` does not contain any Odoo module.\nPlease start this command "
"in your project's directory or use `--path` argument" % project_path)
if mods and '--addons-path' not in cmdargs:
cmdargs.append('--addons-path=%s' % project_path)
if not args.db_name:
args.db_name = db_name or project_path.split(os.path.sep)[-1]
......@@ -58,15 +57,8 @@ class Start(Command):
die("Could not create database `%s`. (%s)" % (args.db_name, e))
cmdargs.extend(('-d', args.db_name))
if '--addons-path' not in cmdargs:
cmdargs.append('--addons-path=%s' % project_path)
if '--db-filter' not in cmdargs:
cmdargs.append('--db-filter=^%s$' % args.db_name)
# Not sure we should auto install the module
# the user should use $ odoo start -i <module>
# if '-i' not in cmdargs and '--init' not in cmdargs:
# # Install all modules of projects even if already installed
# cmdargs.extend(('-i', ','.join(mods)))
main(cmdargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment