<commit_before>:banner: banners/cmdline.jpg

.. _reference/cmdline:

===============================
Command-line interface: odoo.py
===============================

.. _reference/cmdline/server:

Running the server
==================

.. program:: odoo.py

.. option:: -d <database>, --database <database>

    database used when installing or updating modules.

.. option:: -i <modules>, --init <modules>

    comma-separated list of modules to install before running the server
    (requires :option:`-d`).

.. option:: -u <modules>, --update <modules>

    comma-separated list of modules to update before running the server
    (requires :option:`-d`).

.. option:: --addons-path <directories>

    comma-separated list of directories in which modules are stored. These
    directories are scanned for modules (nb: when and why?)

.. option:: --workers <count>

    if ``count`` is not 0 (the default), enables multiprocessing and sets up
    the specified number of HTTP workers (sub-processes processing HTTP
    and RPC requests).

    .. note:: multiprocessing mode is only available on Unix-based systems

    A number of options allow limiting and recyling workers:

    .. option:: --limit-request <limit>

        Number of requests a worker will process before being recycled and
        restarted.

        Defaults to 8196.

    .. option:: --limit-memory-soft <limit>

        Maximum allowed virtual memory per worker. If the limit is exceeded,
        the worker is killed and recycled at the end of the current request.

        Defaults to 640MB.

    .. option:: --limit-memory-hard <limit>

        Hard limit on virtual memory, any worker exceeding the limit will be
        immediately killed without waiting for the end of the current request
        processing.

        Defaults to 768MB.

    .. option:: --limit-time-cpu <limit>

        Prevents the worker from using more than <limit> CPU seconds for each
        request. If the limit is exceeded, the worker is killed.

        Defaults to 60.

    .. option:: --limit-time-real <limit>

        Prevents the worker from taking longer than <limit> seconds to process
        a request. If the limit is exceeded, the worker is killed.

        Differs from :option:`--limit-time-cpu` in that this is a "wall time"
        limit including e.g. SQL queries.

        Defaults to 120.

.. option:: --max-cron-threads <count>

    number of workers dedicated to cron jobs. Defaults to 2. The workers are
    threads in multithreading mode and processes in multiprocessing mode.

    For multiprocessing mode, this is in addition to the HTTP worker
    processes.

.. option:: -c <config>, --config <config>

    provide an alternate configuration file

.. option:: -s, --save

    saves the server configuration to the current configuration file
    (:file:`{$HOME}/.openerp_serverrc` by default, overridable using
    :option:`-c`)

.. option:: --proxy-mode

    enables the use of ``X-Forwarded-*`` headers through `Werkzeug's proxy
    support`_.

    .. warning:: proxy mode *must not* be enabled outside of a reverse proxy
                 scenario

.. option:: --test-enable

    runs tests after installing modules

.. option:: --debug

    when an unexpected error is raised (not a warning or an access error),
    automatically starts :mod:`python:pdb` before logging and returning the
    error

.. _reference/cmdline/server/database:

database
--------
<commit_msg>[ADD] doc: add doc about dev mode<commit_after>:banner: banners/cmdline.jpg

.. _reference/cmdline:

===============================
Command-line interface: odoo.py
===============================

.. _reference/cmdline/server:

Running the server
==================

.. program:: odoo.py

.. option:: -d <database>, --database <database>

    database used when installing or updating modules.

.. option:: -i <modules>, --init <modules>

    comma-separated list of modules to install before running the server
    (requires :option:`-d`).

.. option:: -u <modules>, --update <modules>

    comma-separated list of modules to update before running the server
    (requires :option:`-d`).

.. option:: --addons-path <directories>

    comma-separated list of directories in which modules are stored. These
    directories are scanned for modules (nb: when and why?)

.. option:: --workers <count>

    if ``count`` is not 0 (the default), enables multiprocessing and sets up
    the specified number of HTTP workers (sub-processes processing HTTP
    and RPC requests).

    .. note:: multiprocessing mode is only available on Unix-based systems

    A number of options allow limiting and recyling workers:

    .. option:: --limit-request <limit>

        Number of requests a worker will process before being recycled and
        restarted.

        Defaults to 8196.

    .. option:: --limit-memory-soft <limit>

        Maximum allowed virtual memory per worker. If the limit is exceeded,
        the worker is killed and recycled at the end of the current request.

        Defaults to 640MB.

    .. option:: --limit-memory-hard <limit>

        Hard limit on virtual memory, any worker exceeding the limit will be
        immediately killed without waiting for the end of the current request
        processing.

        Defaults to 768MB.

    .. option:: --limit-time-cpu <limit>

        Prevents the worker from using more than <limit> CPU seconds for each
        request. If the limit is exceeded, the worker is killed.

        Defaults to 60.

    .. option:: --limit-time-real <limit>

        Prevents the worker from taking longer than <limit> seconds to process
        a request. If the limit is exceeded, the worker is killed.

        Differs from :option:`--limit-time-cpu` in that this is a "wall time"
        limit including e.g. SQL queries.

        Defaults to 120.

.. option:: --max-cron-threads <count>

    number of workers dedicated to cron jobs. Defaults to 2. The workers are
    threads in multithreading mode and processes in multiprocessing mode.

    For multiprocessing mode, this is in addition to the HTTP worker
    processes.

.. option:: -c <config>, --config <config>

    provide an alternate configuration file

.. option:: -s, --save

    saves the server configuration to the current configuration file
    (:file:`{$HOME}/.openerp_serverrc` by default, overridable using
    :option:`-c`)

.. option:: --proxy-mode

    enables the use of ``X-Forwarded-*`` headers through `Werkzeug's proxy
    support`_.

    .. warning:: proxy mode *must not* be enabled outside of a reverse proxy
                 scenario

.. option:: --test-enable

    runs tests after installing modules

.. option:: --dev <feature,feature,...,feature>

    * ``all``: all the features below are activated

    * ``xml``: read template qweb from xml file directly instead of database.
      Once a template has been modified in database, it will be not be read from
      the xml file until the next update/init.

    * ``reload``: restart server when python file are updated (may not be detected
      depending on the text editor used)

    * ``qweb``: break in the evaluation of qweb template when a node contains ``t-debug='debugger'``

    * ``(i)p(u)db``: start the chosen python debugger in the code when an
      unexpected error is raised before logging and returning the error.

.. _reference/cmdline/server/database:

database
--------

{'fraction_non_alphanumeric': 0.11277082492262146, 'fraction_numerical': 0.004575427264163639, 'mean_word_length': 2.7899031106578276, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6057227', 'n_tokens_mistral': 2042, 'n_tokens_neox': 1896, 'n_words': 871}