Skip to content

Commit 7316152

Browse files
committed
[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 #1699 X-original-commit: c018a53 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
1 parent 7b9bb78 commit 7316152

File tree

2 files changed

+43
-10
lines changed

2 files changed

+43
-10
lines changed

content/administration/install/install.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -646,8 +646,7 @@ A typical way to run the server would be:
646646
647647
Where `CommunityPath` is the path of the Odoo Community installation, `dbuser` is the
648648
PostgreSQL login, `dbpassword` is the PostgreSQL password and `mydb` is the default database
649-
to serve on `localhost:8069`. You can add other directory paths separated by a comma to
650-
`addons` at the end of the `addons-path` option.
649+
to serve on `localhost:8069`.
651650

652651
.. group-tab:: Linux
653652

@@ -657,8 +656,7 @@ A typical way to run the server would be:
657656
$ python3 odoo-bin --addons-path=addons -d mydb
658657
659658
Where `CommunityPath` is the path of the Odoo Community installation and `mydb` is the default
660-
database to serve on `localhost:8069`. You can add other directory paths separated by a comma
661-
to `addons` at the end of the `addons-path` option.
659+
database to serve on `localhost:8069`.
662660

663661
.. group-tab:: Mac OS
664662

@@ -668,16 +666,18 @@ A typical way to run the server would be:
668666
$ python3 odoo-bin --addons-path=addons -d mydb
669667
670668
Where `CommunityPath` is the path of the Odoo Community installation and `mydb` is the default
671-
database to serve on `localhost:8069`. You can add other directory paths separated by a comma
672-
to `addons` at the end of the `addons-path` option.
669+
database to serve on `localhost:8069`.
670+
671+
.. seealso::
672+
- :doc:`The exhaustive list of arguments for odoo-bin </developer/misc/other/cmdline>`.
673673

674674
.. _setup/install/docker:
675675

676676
Docker
677677
======
678678

679679
The full documentation on how to use Odoo with Docker can be found on the
680-
official Odoo `docker image <https://registry.hub.docker.com/_/odoo/>`_ page.
680+
official Odoo `docker image <https://hub.docker.com/_/odoo/>`_ page.
681681

682682
.. _Debian 11 (Bullseye): https://www.debian.org/releases/bullseye/
683683
.. _demo: https://demo.odoo.com

content/developer/misc/other/cmdline.rst

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,40 @@
11

22
.. _reference/cmdline:
33

4-
=============
5-
CLI: odoo-bin
6-
=============
4+
============================
5+
Command-line interface (CLI)
6+
============================
7+
8+
The CLI :dfn:`command-line interface` offers several functionalities related to Odoo. You can use it
9+
to :ref:`run the server <reference/cmdline/server>`, :ref:`launch Odoo as a Python console
10+
environment <reference/cmdline/shell>`, :ref:`scaffold an Odoo module <reference/cmdline/scaffold>`,
11+
:ref:`populate a database <reference/cmdline/populate>`, or :ref:`count the number of lines of code
12+
<reference/cmdline/cloc>`.
13+
14+
.. important::
15+
The command to use to call the CLI depends on how you installed Odoo. In the examples below, we
16+
assume that you are :ref:`running Odoo from source <setup/install/source>` with the
17+
:file:`odoo-bin` file. If you installed Odoo :ref:`from a distribution package
18+
<setup/install/packaged>` or :ref:`with Docker <setup/install/docker>`, you must adapt the
19+
command.
20+
21+
.. tabs::
22+
23+
.. tab:: Run Odoo from source
24+
25+
#. Navigate to the root of the directory where you downloaded the source files of Odoo
26+
Community.
27+
#. Run all CLI commands with :command:`./odoo-bin`
28+
29+
.. tab:: Odoo was installed from a distribution package
30+
31+
When Odoo was installed, an executable named `odoo` was added to your user's PATH. Replace
32+
all occurrences of :command:`odoo-bin` with :command:`odoo` in the examples below.
33+
34+
.. tab:: Odoo was installed with Docker
35+
36+
Please refer to the `documentation of the official Docker image of Odoo
37+
<https://hub.docker.com/_/odoo/>`_.
738

839
.. _reference/cmdline/help:
940

@@ -607,6 +638,7 @@ Here is a sample file:
607638
http://werkzeug.pocoo.org/docs/contrib/fixers/#werkzeug.contrib.fixers.ProxyFix
608639
.. _pyinotify: https://github.com/seb-m/pyinotify/wiki
609640

641+
.. _reference/cmdline/shell:
610642

611643
Shell
612644
=====
@@ -689,6 +721,7 @@ generation of the model's records to test your modules in databases containing n
689721

690722
:ref:`reference/testing/populate`
691723

724+
.. _reference/cmdline/cloc:
692725

693726
Cloc
694727
====

0 commit comments

Comments
 (0)