Skip to content

Commit c123d0b

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 #1695 X-original-commit: b81c121 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
1 parent cabc254 commit c123d0b

File tree

2 files changed

+48
-10
lines changed

2 files changed

+48
-10
lines changed

content/administration/install/install.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,10 @@ A typical way to run the server would be:
409409
410410
Where `CommunityPath` is the path of the Odoo Community installation, `dbuser` is the
411411
PostgreSQL login, `dbpassword` is the PostgreSQL password
412-
and `mydb` is the default database to serve on `localhost:8069`. You can add other
413-
directory paths separated by a comma to ``addons`` at the end of the addons-path option.
412+
and `mydb` is the default database to serve on `localhost:8069`.
413+
414+
.. seealso::
415+
- :doc:`The exhaustive list of arguments for odoo-bin </developer/misc/other/cmdline>`.
414416

415417
Linux
416418
-----
@@ -578,8 +580,10 @@ A typical way to run the server would be:
578580
$ python3 odoo-bin --addons-path=addons -d mydb
579581
580582
Where `CommunityPath` is the path of the Odoo Community installation
581-
and `mydb` is the default database to serve on `localhost:8069`. You can add other
582-
directory paths separated by a comma to ``addons`` at the end of the addons-path option.
583+
and `mydb` is the default database to serve on `localhost:8069`.
584+
585+
.. seealso::
586+
- :doc:`The exhaustive list of arguments for odoo-bin </developer/misc/other/cmdline>`.
583587

584588
Mac OS
585589
------
@@ -740,17 +744,18 @@ A typical way to run the server would be:
740744
$ python3 odoo-bin --addons-path=addons -d mydb
741745
742746
Where `CommunityPath` is the path of the Odoo Community installation
743-
and `mydb` is the default database to serve on `localhost:8069`. You can add other
744-
directory paths separated by a comma to ``addons`` at the end of the addons-path option.
747+
and `mydb` is the default database to serve on `localhost:8069`.
745748

749+
.. seealso::
750+
- :doc:`The exhaustive list of arguments for odoo-bin </developer/misc/other/cmdline>`.
746751

747752
.. _setup/install/docker:
748753

749754
Docker
750755
======
751756

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

755760
.. _Debian Buster: https://www.debian.org/releases/buster/
756761
.. _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/server:
940

@@ -521,6 +552,7 @@ Here is a sample file:
521552
http://werkzeug.pocoo.org/docs/contrib/fixers/#werkzeug.contrib.fixers.ProxyFix
522553
.. _pyinotify: https://github.com/seb-m/pyinotify/wiki
523554

555+
.. _reference/cmdline/shell:
524556

525557
Shell
526558
=====
@@ -603,6 +635,7 @@ generation of the model's records to test your modules in databases containing n
603635

604636
:ref:`reference/testing/populate`
605637

638+
.. _reference/cmdline/cloc:
606639

607640
Cloc
608641
====

0 commit comments

Comments
 (0)