From c123d0b978013ad7f29bad86d9db8f86fcfae149 Mon Sep 17 00:00:00 2001 From: "Antoine Vandevenne (anv)" Date: Mon, 14 Mar 2022 10:36:16 +0000 Subject: [PATCH] [IMP] developer/cli: mention the different ways of calling the CLI All examples on the page suggest calling the CLI with "odoo-bin" while it is recommended to call it with "odoo" when Odoo was installed from a distribution package. It also failed to mention the location of "odoo-bin" relative to the source files. The chance is also taken to rename the somewhat unclear page title to something more clear and generic. closes odoo/documentation#1695 X-original-commit: b81c121ea0c9194732b82ebe1f1c2ccf19c77a80 Signed-off-by: Antoine Vandevenne (anv) --- content/administration/install/install.rst | 19 +++++++---- content/developer/misc/other/cmdline.rst | 39 ++++++++++++++++++++-- 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/content/administration/install/install.rst b/content/administration/install/install.rst index 60d7152fb..96feb8775 100644 --- a/content/administration/install/install.rst +++ b/content/administration/install/install.rst @@ -409,8 +409,10 @@ A typical way to run the server would be: Where `CommunityPath` is the path of the Odoo Community installation, `dbuser` is the PostgreSQL login, `dbpassword` is the PostgreSQL password -and `mydb` is the default database to serve on `localhost:8069`. You can add other -directory paths separated by a comma to ``addons`` at the end of the addons-path option. +and `mydb` is the default database to serve on `localhost:8069`. + +.. seealso:: + - :doc:`The exhaustive list of arguments for odoo-bin `. Linux ----- @@ -578,8 +580,10 @@ A typical way to run the server would be: $ python3 odoo-bin --addons-path=addons -d mydb Where `CommunityPath` is the path of the Odoo Community installation -and `mydb` is the default database to serve on `localhost:8069`. You can add other -directory paths separated by a comma to ``addons`` at the end of the addons-path option. +and `mydb` is the default database to serve on `localhost:8069`. + +.. seealso:: + - :doc:`The exhaustive list of arguments for odoo-bin `. Mac OS ------ @@ -740,9 +744,10 @@ A typical way to run the server would be: $ python3 odoo-bin --addons-path=addons -d mydb Where `CommunityPath` is the path of the Odoo Community installation -and `mydb` is the default database to serve on `localhost:8069`. You can add other -directory paths separated by a comma to ``addons`` at the end of the addons-path option. +and `mydb` is the default database to serve on `localhost:8069`. +.. seealso:: + - :doc:`The exhaustive list of arguments for odoo-bin `. .. _setup/install/docker: @@ -750,7 +755,7 @@ Docker ====== The full documentation on how to use Odoo with Docker can be found on the -official Odoo `docker image `_ page. +official Odoo `docker image `_ page. .. _Debian Buster: https://www.debian.org/releases/buster/ .. _demo: https://demo.odoo.com diff --git a/content/developer/misc/other/cmdline.rst b/content/developer/misc/other/cmdline.rst index 4666f9d0e..7398b56d3 100644 --- a/content/developer/misc/other/cmdline.rst +++ b/content/developer/misc/other/cmdline.rst @@ -1,9 +1,40 @@ .. _reference/cmdline: -============= -CLI: odoo-bin -============= +============================ +Command-line interface (CLI) +============================ + +The CLI :dfn:`command-line interface` offers several functionalities related to Odoo. You can use it +to :ref:`run the server `, :ref:`launch Odoo as a Python console +environment `, :ref:`scaffold an Odoo module `, +:ref:`populate a database `, or :ref:`count the number of lines of code +`. + +.. important:: + The command to use to call the CLI depends on how you installed Odoo. In the examples below, we + assume that you are :ref:`running Odoo from source ` with the + :file:`odoo-bin` file. If you installed Odoo :ref:`from a distribution package + ` or :ref:`with Docker `, you must adapt the + command. + + .. tabs:: + + .. tab:: Run Odoo from source + + #. Navigate to the root of the directory where you downloaded the source files of Odoo + Community. + #. Run all CLI commands with :command:`./odoo-bin` + + .. tab:: Odoo was installed from a distribution package + + When Odoo was installed, an executable named `odoo` was added to your user's PATH. Replace + all occurrences of :command:`odoo-bin` with :command:`odoo` in the examples below. + + .. tab:: Odoo was installed with Docker + + Please refer to the `documentation of the official Docker image of Odoo + `_. .. _reference/cmdline/server: @@ -521,6 +552,7 @@ Here is a sample file: http://werkzeug.pocoo.org/docs/contrib/fixers/#werkzeug.contrib.fixers.ProxyFix .. _pyinotify: https://github.com/seb-m/pyinotify/wiki +.. _reference/cmdline/shell: Shell ===== @@ -603,6 +635,7 @@ generation of the model's records to test your modules in databases containing n :ref:`reference/testing/populate` +.. _reference/cmdline/cloc: Cloc ====