Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
d9def2c4
Commit
d9def2c4
authored
10 years ago
by
Fabien Meghazi
Browse files
Options
Downloads
Patches
Plain Diff
Simplify odoo start. Make it work everywhere
parent
fa4ed55d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openerp/cli/start.py
+2
-10
2 additions, 10 deletions
openerp/cli/start.py
with
2 additions
and
10 deletions
openerp/cli/start.py
+
2
−
10
View file @
d9def2c4
...
...
@@ -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.
\n
Please 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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment