[IMP] hw_escpos: print a status receipt on printer connection with ip address for...
[odoo/odoo.git] / doc / openerp-command.rst
1 .. _openerp-command:
2
3 The ``oe`` script
4 =================
5
6 The ``oe`` script provides a set of command-line tools around the OpenERP
7 framework. It is meant to replace the older ``openerp-server`` script (which
8 is still available).
9
10 Using ``oe``
11 ------------
12
13 In contrast to the previous ``openerp-server`` script, ``oe`` defines a few
14 commands, each with its own set of flags and options. You can get some
15 information for any of them with
16
17 ::
18
19   > oe <command> --help
20
21 For instance::
22
23   > oe run-tests --help
24
25 Some ``oe`` options can be provided via environment variables. For instance::
26
27   > export OPENERP_DATABASE=trunk
28   > export OPENERP_HOST=127.0.0.1
29   > export OPENERP_PORT=8069
30
31 Depending on your needs, you can group all of the above in one single script;
32 for instance here is a, say, ``test-trunk-view-validation.sh`` file::
33
34   COMMAND_REPO=/home/thu/repos/command/trunk/
35   SERVER_REPO=/home/thu/repos/server/trunk
36
37   export PYTHONPATH=$SERVER_REPO:$COMMAND_REPO
38   export PATH=$SERVER_REPO:$COMMAND_REPO:$PATH
39   export OPENERP_DATABASE=trunk
40   export OPENERP_HOST=127.0.0.1
41   export OPENERP_PORT=8069
42
43   # The -d ignored is actually needed by `oe` even though `test_view_validation`
44   # itself does not need it.
45   oe run-tests -d ignored -m openerp.test_view_validation
46
47 Available commands
48 -------------------
49
50 See the :doc:`commands` page.
51
52 Adding new commands
53 -------------------
54
55 See the :doc:`adding-command` page.
56
57 Bash completion
58 ---------------
59
60 A preliminary ``oe-bash-completion`` file is provided. After sourcing it,
61
62 ::
63
64   > . oe-bash-completion
65
66 completion (using the TAB character) in Bash should work.