[FIX] mail: compose wizard: fixed default_get overrides not correctly managing the...
[odoo/odoo.git] / doc / 01_getting_started.rst
1 ========================================
2 Getting started with OpenERP development
3 ========================================
4
5 .. toctree::
6    :maxdepth: 1
7
8 Installation from sources
9 ==========================
10
11 .. _getting_started_installation_source-link:
12
13 Source code is hosted on Launchpad_. In order to get the sources, you
14 will need Bazaar_ to pull the source from Launchpad. Bazaar is a
15 version control system that helps you track project history over time
16 and collaborate efficiently. You may have to create an account on
17 Launchpad to be able to collaborate on OpenERP development. Please
18 refer to the Launchpad and Bazaar documentation to install and setup
19 your development environment.
20
21 The running example of this section is based on an Ubuntu
22 environment. You may have to adapt the steps according to your
23 system. Once your working environment is ready, prepare a working
24 directory that will contain the sources.  For a ``source`` base
25 directory, type::
26
27   mkdir source;cd source
28
29 OpenERP provides a setup script that automatizes the tasks of creating
30 a shared repository and getting the source code. Get the setup script
31 of OpenERP by typing::
32
33   bzr cat -d lp:~openerp-dev/openerp-tools/trunk setup.sh | sh
34
35 This will create the following two files in your ``source`` directory::
36
37   -rw-rw-r--  1 openerp openerp 5465 2012-04-17 11:05 Makefile
38   -rw-rw-r--  1 openerp openerp 2902 2012-04-17 11:05 Makefile_helper.py
39
40 If you want some help about the available options, please type::
41
42   make help
43
44 Next step is to initialize the shared repository and download the
45 sources. Get the current trunk version of OpenERP by typing::
46
47   make init-trunk
48
49 This will create the following structure inside your ``source``
50 directory, and fetch the latest source code from ``trunk``::
51
52   drwxrwxr-x  3 openerp openerp 4096 2012-04-17 11:10 addons
53   drwxrwxr-x  3 openerp openerp 4096 2012-04-17 11:10 misc
54   drwxrwxr-x  3 openerp openerp 4096 2012-04-17 11:10 server
55   drwxrwxr-x  3 openerp openerp 4096 2012-04-17 11:10 web
56
57 Some dependencies are necessary to use OpenERP. Depending on your
58 environment, you might have to install the following packages::
59
60   sudo apt-get install graphviz ghostscript postgresql-client \
61             python-dateutil python-feedparser python-gdata \
62             python-ldap python-libxslt1 python-lxml python-mako \
63             python-openid python-psycopg2 python-pybabel python-pychart \
64             python-pydot python-pyparsing python-reportlab python-simplejson \
65             python-tz python-vatnumber python-vobject python-webdav \
66             python-werkzeug python-xlwt python-yaml python-imaging \
67             python-matplotlib
68
69 Next step is to initialize the database. This will create a new openerp role::
70
71   make db-setup
72
73 Finally, launch the OpenERP server::
74
75   make server
76
77 Testing your installation can be done on http://localhost:8069/. You
78 should see the OpenERP main login page.
79
80 .. _Launchpad: https://launchpad.net/
81 .. _Bazaar: http://bazaar.canonical.com/en/
82
83 Command line options
84 ====================
85
86 .. program:: openerp-server
87
88 Using the command ::
89
90   ./openerp-server --help
91
92 General Options
93 +++++++++++++++
94
95 ::
96
97   --version                           show program version number and exit
98   -h, --help                          show this help message and exit
99   -c CONFIG, --config=CONFIG          specify alternate config file
100   -s, --save                          save configuration to ~/.terp_serverrc
101   -v, --verbose                       enable debugging
102   --pidfile=PIDFILE                   file where the server pid will be stored
103   --logfile=LOGFILE                   file where the server log will be stored
104   -n INTERFACE, --interface=INTERFACE specify the TCP IP address
105   -p PORT, --port=PORT                specify the TCP port
106   --no-xmlrpc                         disable xmlrpc
107   -i INIT, --init=INIT                init a module (use "all" for all modules)
108   --without-demo=WITHOUT_DEMO         load demo data for a module (use "all" for all modules)
109   -u UPDATE, --update=UPDATE          update a module (use "all" for all modules)
110   --stop-after-init                   stop the server after it initializes
111   --debug                             enable debug mode
112   -S, --secure                        launch server over https instead of http
113   --smtp=SMTP_SERVER                  specify the SMTP server for sending mail
114  
115 Database related options
116 ++++++++++++++++++++++++
117
118 ::
119
120   -d DB_NAME, --database=DB_NAME
121                         specify the database name
122   -r DB_USER, --db_user=DB_USER
123                         specify the database user name
124   -w DB_PASSWORD, --db_password=DB_PASSWORD
125                         specify the database password
126   --pg_path=PG_PATH   specify the pg executable path
127   --db_host=DB_HOST   specify the database host
128   --db_port=DB_PORT   specify the database port
129  
130 Internationalization options
131 ++++++++++++++++++++++++++++
132
133 Use these options to translate OpenERP to another language.See i18n
134 section of the user manual. Option '-l' is mandatory.::
135  
136   -l LANGUAGE, --language=LANGUAGE
137                        specify the language of the translation file. Use it
138                        with --i18n-export and --i18n-import
139   --i18n-export=TRANSLATE_OUT
140                        export all sentences to be translated to a CSV file
141                        and exit
142   --i18n-import=TRANSLATE_IN
143                        import a CSV file with translations and exit
144   --modules=TRANSLATE_MODULES
145                        specify modules to export. Use in combination with
146                        --i18n-export
147
148 Options from previous versions
149 ++++++++++++++++++++++++++++++
150
151 Some options were removed in OpenERP version 6. For example,
152 ``price_accuracy`` is now configured through the
153 :ref:`decimal_accuracy` screen.
154
155 Configuration
156 ==============
157
158 .. _getting_started_configuration-link:
159
160 Two configuration files are available:
161
162     * one for the client: ``~/.openerprc``
163     * one for the server: ``~/.openerp_serverrc``
164
165 If they are not found, the server and the client will start with a
166 default configuration. Those files follow the convention used by
167 python's ConfigParser module. Please note that lines beginning with
168 "#" or ";" are comments. The client configuration file is
169 automatically generated upon the first start. The sezrver
170 configuration file can automatically be created using the command ::
171
172   ./openerp-server -s or ./openerp-server --save
173
174 You can specify alternate configuration files with ::
175
176   -c CONFIG, --config=CONFIG specify alternate config file
177
178 Configure addons locations
179 ++++++++++++++++++++++++++
180
181 By default, the only directory of addons known by the server is
182 server/bin/addons. It is possible to add new addons by
183
184  - copying them in server/bin/addons, or creating a symbolic link to
185    each of them in this directory, or
186  - specifying another directory containing addons to the server. The
187    later can be accomplished either by running the server with the
188    ``--addons-path=`` option, or by configuring this option in the
189    openerp_serverrc file, automatically generated under Linux in your
190    home directory by the server when executed with the ``--save``
191    option. You can provide several addons to the ``addons_path`` =
192    option, separating them using commas.
193
194 Start-up script
195 ===============
196
197 .. versionadded:: 6.1
198
199 To run the OpenERP server, the conventional approach is to use the
200 `openerp-server` script.  It loads the :ref:`openerp library`, sets a
201 few configuration variables corresponding to command-line arguments,
202 and starts to listen to incoming connections from clients.
203
204 Depending on your deployment needs, you can write such a start-up script very
205 easily. We also recommend you take a look at an alternative tool called
206 `openerp-command` that can, among other things, launch the server.
207
208 Yet another alternative is to use a WSGI-compatible HTTP server and let it call
209 into one of the WSGI entry points of the server.
210
211