1ec7d96ae9d8013eef326dcd18d49276d4b60761
[odoo/odoo.git] / doc / reference / cmdline.rst
1 .. _reference/cmdline:
2
3 ===============================
4 Command-line interface: odoo.py
5 ===============================
6
7 .. _reference/cmdline/server:
8
9 Running the server
10 ==================
11
12 .. program:: odoo.py
13
14 .. option:: -d <database>, --database=<database>
15
16     database used when installing or updating modules.
17
18 .. option:: --db-filter=<filter>
19
20     hides databases that do not match ``<filter>``. The filter is a
21     `regular expression`_, with the additions that:
22
23     - ``%h`` is replaced by the whole hostname the request is made on.
24     - ``%d`` is replaced by the subdomain the request is made on, with the
25       exception of ``www`` (so domain ``odoo.com`` and ``www.odoo.com`` both
26       match the database ``odoo``)
27
28 .. option:: -i <modules>, --init=<modules>
29
30     comma-separated list of modules to install before running the server
31     (requires :option:`-d`).
32
33 .. option:: -u <modules>, --update=<modules>
34
35     comma-separated list of modules to update before running the server
36     (requires :option:`-d`).
37
38 .. option:: --addons-path=<directories>
39
40     comma-separated list of directories in which modules are stored. These
41     directories are scanned for modules (nb: when and why?)
42
43 .. option:: -c <config>, --config=<config>
44
45     provide an alternate configuration file
46
47 .. option:: -s, --save
48
49     saves the server configuration to the current configuration file
50     (:file:`{$HOME}/.openerp_serverrc` by default, overridable using
51     :option:`-c`)
52
53 .. option:: --test-enable
54
55     runs tests after installing modules
56
57 .. _reference/cmdline/scaffold:
58
59 Scaffolding
60 ===========
61
62 .. program:: odoo.py scaffold
63
64 Scaffolding is the automated creation of a skeleton structure to simplify
65 bootstrapping (of new modules, in the case of Odoo). While not necessary it
66 avoids the tedium of setting up basic structures and looking up what all
67 starting requirements are.
68
69 Scaffolding is available via the :command:`odoo.py scaffold` subcommand.
70
71 .. option:: -t <template>
72
73     a template directory, files are passed through jinja2_ then copied to
74     the ``destination`` directory
75
76 .. option:: name
77
78     the name of the module to create, may munged in various manners to
79     generate programmatic names (e.g. module directory name, model names, …)
80
81 .. option:: destination
82
83     directory in which to create the new module, defaults to the current
84     directory
85
86 .. _reference/cmdline/config:
87
88 Configuration file
89 ==================
90
91 Most of the command-line options can also be specified via a configuration
92 file.
93
94 The default configuration file is :file:`{$HOME}/.openerp_serverrc` which
95 can be overridden using :option:`--config <odoo.py -c>`. Specifying
96 :option:`--save <odoo.py -s>` will save the current configuration state back
97 to that file.
98
99 .. _jinja2: http://jinja.pocoo.org
100 .. _regular expression: https://docs.python.org/2/library/re.html