Odoo command-line arguments Summary

odoo command-line tool cmdline refers odoo.py or odoo-bin file

Following starting parameters, the following parameters of the new section separate description odoo12

-d <database name>, --database <database name>

Specifies the database used to run a service

-i <module>, --init <module>

Module list before running the installation of specified services (available separated by commas need -d parameter)

-u <module>, --update <module>

Before running the update service list specifies modules (available separated by commas need -d parameter)

--addons-path <directory>

Catalog comma-separated storage module, scan and catalog these modules loaded when running the service.

--workers <数量>

The default number of processes is 0, if more than 0, the open multi-process mode, the number is the number of http worker, each may be treated separately http worker RPC requests and HTTP (Windows is invalid parameters, can not be set)

The following parameters beginning with the limit may be restrictions on each http worker

--limit-request <limiting the number>

A worker prior to recovery in the number of requests that can be processed or restart (default 8196)

--limit-memory-soft <memory limitations>

A worker allows maximum virtual memory. If the limit is exceeded, this role will be stopped and recovered after the end of the current request.

The default is 2048MB (different versions of the default size may be different, the memory unit can be MB, G, etc.)

--limit-memory-hard <memory limitations>

Virtual memory of mandatory restrictions, any worker exceed the limit will be killed immediately, without waiting for the end of the current request processing.

The default is 2560MB (memory unit can be MB, G, etc.)

--limit-time-cpu <restriction seconds>

Each worker is provided for the maximum number of seconds CPU request used. If the limit is exceeded, worker will be killed.

The default is 60

--limit-time-real <restriction seconds>

Each worker is provided for the maximum number of seconds CPU request used. If the limit is exceeded, worker will be killed.

And --limit-time-cpu difference is that it has a limit "wall time" of, for example, comprise a SQL query time.

The default is 120.

--max-cron-threads <数量>

Number of worker used a timing task. The default is 2.

The actual number is the number of multi-threaded process model number of threads and multi-process mode. For multi-process model, is the number of HTTP worker processes outside of.

-c <Profile>, --config <Profile>

Specify a startup configuration file, it is recommended to use absolute paths

-s, --save

Save the current configuration to the current server configuration file (the default is $ HOME / .odoorc, can be used to cover the front of the -c parameter, you can see some default configuration items of value preservation, but not all configurations are listed)

--proxy-mode

Werkzeug proxy support enabled through the use of X-Forwarded- * header, record user real IP address in the log, the need to affirm this parameter, while this parameter must be used in reverse proxy mode.

--test-enable

After installing the module test run

--test tags 'tag_1, TAG_2, ..., - tag_n'

Select the test enabled tag as a list of comma-delimited string

--dev <function, function, ..., function>

All features are all activated following
xml template QWeb read directly from the XML file, rather than from the database. By default, if the module template is modified in the database, it will not read the XML file, or until the next update module initialization.
When the file is updated python reload restart the service (may not be detected depending on the text editor)
related qweb qweb template is interrupted when a node contains t-debug = 'debugger'.
(i) p (u) db when an exception is thrown to start a python debugger returned before the error log.

Database parameters
-r <database user>, --db_user <User Database>

Database user name for connecting to PostgreSQL

-w <database password>, --db_password <database password>

Database password, if a password authentication pg.

--db_host <host address>
database server address

To localhost on Windows
or a UNIX socket

--db_port <port number>

Database listening port number, the default is 5432

--db-filter <filter>

Hide does not match the <Filter> database. Filters filter is a regular expression, the parameters may include:

% h is replaced with the full hostname being requested.
% d is replaced with the requested sub-domain, www exceptions (http://odoo.com domain and thus can simultaneously match http://www.odoo.com database odoo).
These operations are case sensitive. You can add parameter (? I) to match all databases (and therefore domain http://odoo.com can use (? I)% d matching database Odoo).

Since Odoo11 on, can enforce can access the database through --database parameters, can be connected to one or more database name (separated by a comma), db-filter database may be used in combination.

example

odoo-bin --db-filter ^ 11. * enforce the db name can begin with a visit of 11

odoo-bin --database 11firstdatabase, 11seconddatabase can only access the database 11firstdatabase and 11seconddatabase

odoo-bin --database 11firstdatabase, 11seconddatabase -u base can only access the database and update 11firstdatabase and 11seconddatabase base module, if the database does not exist, automatically create and install base module

odoo-bin --db-filter ^ 11. * $ --database 11firstdatabase, 11seconddatabase -u base and above, but will enter the dbname first filter through the filter once

--db-template <template name>

When you create a new database from the database management interface, using the specified template database. The default is template1.

--no-database-list
prohibit display system available in the database

Original link: https://www.erpdaxue.cn/odoo/odoo tutorial / odoo command line parameter /

 

Guess you like

Origin www.cnblogs.com/odoo12/p/12499000.html