3 ===============================
4 Command-line interface: odoo.py
5 ===============================
7 .. _reference/cmdline/server:
14 .. option:: -d <database>, --database=<database>
16 database used when installing or updating modules.
18 .. option:: --db-filter=<filter>
20 hides databases that do not match ``<filter>``. The filter is a
21 `regular expression`_, with the additions that:
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``)
28 .. option:: -i <modules>, --init=<modules>
30 comma-separated list of modules to install before running the server
31 (requires :option:`-d`).
33 .. option:: -u <modules>, --update=<modules>
35 comma-separated list of modules to update before running the server
36 (requires :option:`-d`).
38 .. option:: --addons-path=<directories>
40 comma-separated list of directories in which modules are stored. These
41 directories are scanned for modules (nb: when and why?)
43 .. option:: -c <config>, --config=<config>
45 provide an alternate configuration file
47 .. option:: -s, --save
49 saves the server configuration to the current configuration file
50 (:file:`{$HOME}/.openerp_serverrc` by default, overridable using
53 .. option:: --test-enable
55 runs tests after installing modules
59 when an unexpected error is raised (not a warning or an access error),
60 automatically starts :mod:`python:pdb` before logging and returning the
63 .. _reference/cmdline/scaffold:
68 .. program:: odoo.py scaffold
70 Scaffolding is the automated creation of a skeleton structure to simplify
71 bootstrapping (of new modules, in the case of Odoo). While not necessary it
72 avoids the tedium of setting up basic structures and looking up what all
73 starting requirements are.
75 Scaffolding is available via the :command:`odoo.py scaffold` subcommand.
77 .. option:: -t <template>
79 a template directory, files are passed through jinja2_ then copied to
80 the ``destination`` directory
84 the name of the module to create, may munged in various manners to
85 generate programmatic names (e.g. module directory name, model names, …)
87 .. option:: destination
89 directory in which to create the new module, defaults to the current
92 .. _reference/cmdline/config:
97 Most of the command-line options can also be specified via a configuration
100 The default configuration file is :file:`{$HOME}/.openerp_serverrc` which
101 can be overridden using :option:`--config <odoo.py -c>`. Specifying
102 :option:`--save <odoo.py -s>` will save the current configuration state back
105 .. _jinja2: http://jinja.pocoo.org
106 .. _regular expression: https://docs.python.org/2/library/re.html