diff options
| author | Géry Debongnie <ged@odoo.com> | 2014-05-30 09:22:12 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2014-05-30 09:22:12 +0200 |
| commit | 6b4a227cd43b6c031356557cc1f4d6cf6cecd0dd (patch) | |
| tree | fb75d97275c2530863e1c5c7eaa0c7656de1d5df /doc | |
| parent | 6f436a2a0e12f6f7a1469e67e8d02c8e2393c56e (diff) | |
| parent | 2f4984b8381c6407a720b122733242e6cf3101da (diff) | |
Merge remote-tracking branch 'odoo/master' into master-inline-searchview-ged
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/adding-command.rst | 34 | ||||
| -rw-r--r-- | doc/commands.rst | 40 | ||||
| -rw-r--r-- | doc/git.rst | 5 | ||||
| -rw-r--r-- | doc/index.rst | 10 | ||||
| -rw-r--r-- | doc/openerp-command.rst | 66 |
5 files changed, 2 insertions, 153 deletions
diff --git a/doc/adding-command.rst b/doc/adding-command.rst deleted file mode 100644 index 5a177b06817..00000000000 --- a/doc/adding-command.rst +++ /dev/null @@ -1,34 +0,0 @@ -.. _adding-command: - -Adding a new command -==================== - -``oe`` uses the argparse_ library to implement commands. Each -command lives in its own ``openerpcommand/<command>.py`` file. - -.. _argparse: http://docs.python.org/2.7/library/argparse.html - -To create a new command, probably the most simple way to get started is to -copy/paste an existing command, say ``openerpcommand/initialize.py`` to -``openerpcommand/foo.py``. In the newly created file, the important bits -are the ``run(args)`` and ``add_parser(subparsers)`` functions. - -``add_parser``'s responsability is to create a (sub-)parser for the command, -i.e. describe the different options and flags. The last thing it does is to set -``run`` as the function to call when the command is invoked. - -.. code-block:: python - - > def add_parser(subparsers): - > parser = subparsers.add_parser('<command-name>', - > description='...') - > parser.add_argument(...) - > ... - > parser.set_defaults(run=run) - -``run(args)`` actually implements the command. It should be kept as simple as -possible and delegate most of its work to small functions (probably placed at -the top of the new file). In other words, its responsability is mainly to -deal with the presence/absence/pre-processing of ``argparse``'s arguments. - -Finally, the module must be added to ``openerpcommand/__init__.py``. diff --git a/doc/commands.rst b/doc/commands.rst deleted file mode 100644 index 7a758b1ab2a..00000000000 --- a/doc/commands.rst +++ /dev/null @@ -1,40 +0,0 @@ -.. _commands: - -Available commands -================== - -This page explain some of the available ``oe`` commands. For an overview about -``oe``, see :doc:`openerp-command`. - -Keep in mind that ``oe --help`` and ``oe <command> --help`` already give a lot -of information about the commands and their options and flags. - -``web`` -------- - -The ``web`` command is used to create a single OpenERP server process to handle -regular HTTP requests and XML-RPC requests. It is possible to execute such -process multiple times, possibly on different machines. - -It is possible to chose the ``--threaded`` or ``--gevent`` flags. It is -recommanded to use ``--threaded`` only when running a single process. -``--gevent`` is experimental; it is planned to use it for the embedded chat -feature. - -Example invocation:: - - > oe web --addons ../../addons/trunk:../../web/trunk/addons --threaded - -``cron`` --------- - -The ``cron`` command is used to create a single OpenERP process to execute -so-called cron jobs, also called scheduled tasks in the OpenERP interface. As -for the ``web`` command, multiple cron processes can be run side by side. - -It is necessary to specify on the command-line which database need to be -watched by the cron process with the ``--database`` option. - -Example invocation:: - - > oe cron --addons ../../addons/trunk:../../web/trunk/addons --database production diff --git a/doc/git.rst b/doc/git.rst index d66ca33180b..1d2eaf575d0 100644 --- a/doc/git.rst +++ b/doc/git.rst @@ -7,8 +7,7 @@ Initializing a working copy Use the easy-setup shell script:: - curl -O https://raw.githubusercontent.com/odoo/odoo/master/checkout.sh - sh checkout.sh + curl -O https://raw.githubusercontent.com/odoo/odoo/master/odoo.py | python2 it will will ask a few questions and create a local copy. @@ -26,7 +25,7 @@ repository can have any number of remotes. The setup script creates 2 remotes: the official repository and main branches, roughly corresponds to the old "mainline" branches in bazaar. You should never need to push to it, and by default your local copy is configured to forbid it. -``dev`` +``odoo-dev`` a grab-bag of development branches, you can push your work to it so other coworkers can work with you. diff --git a/doc/index.rst b/doc/index.rst index a61de5ca0e0..ad42e41a10f 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -30,16 +30,6 @@ OpenERP Server form-view-guidelines ir_actions -OpenERP Command -''''''''''''''' - -.. toctree:: - :maxdepth: 1 - - openerp-command.rst - commands.rst - adding-command.rst - OpenERP Server API '''''''''''''''''' diff --git a/doc/openerp-command.rst b/doc/openerp-command.rst deleted file mode 100644 index 6ca7b02b645..00000000000 --- a/doc/openerp-command.rst +++ /dev/null @@ -1,66 +0,0 @@ -.. _openerp-command: - -The ``oe`` script -================= - -The ``oe`` script provides a set of command-line tools around the OpenERP -framework. It is meant to replace the older ``openerp-server`` script (which -is still available). - -Using ``oe`` ------------- - -In contrast to the previous ``openerp-server`` script, ``oe`` defines a few -commands, each with its own set of flags and options. You can get some -information for any of them with - -:: - - > oe <command> --help - -For instance:: - - > oe run-tests --help - -Some ``oe`` options can be provided via environment variables. For instance:: - - > export OPENERP_DATABASE=trunk - > export OPENERP_HOST=127.0.0.1 - > export OPENERP_PORT=8069 - -Depending on your needs, you can group all of the above in one single script; -for instance here is a, say, ``test-trunk-view-validation.sh`` file:: - - COMMAND_REPO=/home/thu/repos/command/trunk/ - SERVER_REPO=/home/thu/repos/server/trunk - - export PYTHONPATH=$SERVER_REPO:$COMMAND_REPO - export PATH=$SERVER_REPO:$COMMAND_REPO:$PATH - export OPENERP_DATABASE=trunk - export OPENERP_HOST=127.0.0.1 - export OPENERP_PORT=8069 - - # The -d ignored is actually needed by `oe` even though `test_view_validation` - # itself does not need it. - oe run-tests -d ignored -m openerp.test_view_validation - -Available commands -------------------- - -See the :doc:`commands` page. - -Adding new commands -------------------- - -See the :doc:`adding-command` page. - -Bash completion ---------------- - -A preliminary ``oe-bash-completion`` file is provided. After sourcing it, - -:: - - > . oe-bash-completion - -completion (using the TAB character) in Bash should work. |
