1 ========================================
2 Getting started with OpenERP development
3 ========================================
8 Installation from sources
9 ==========================
11 .. _getting_started_installation_source-link:
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.
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
27 mkdir source;cd source
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::
33 bzr cat -d lp:~openerp-dev/openerp-tools/trunk setup.sh | sh
35 This will create the following two files in your ``source`` directory::
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
40 If you want some help about the available options, please type::
44 Next step is to initialize the shared repository and download the
45 sources. Get the current trunk version of OpenERP by typing::
49 This will create the following structure inside your ``source``
50 directory, and fetch the latest source code from ``trunk``::
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
57 Some dependencies are necessary to use OpenERP. Depending on your
58 environment, you might have to install the following packages::
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 \
69 Next step is to initialize the database. This will create a new openerp role::
73 Finally, launch the OpenERP server::
77 Testing your installation can be done on http://localhost:8069/. You
78 should see the OpenERP main login page.
80 .. _Launchpad: https://launchpad.net/
81 .. _Bazaar: http://bazaar.canonical.com/en/
86 .. program:: openerp-server
90 ./openerp-server --help
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
115 Database related options
116 ++++++++++++++++++++++++
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
130 Internationalization options
131 ++++++++++++++++++++++++++++
133 Use these options to translate OpenERP to another language.See i18n
134 section of the user manual. Option '-l' is mandatory.::
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
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
148 Options from previous versions
149 ++++++++++++++++++++++++++++++
151 Some options were removed in OpenERP version 6. For example,
152 ``price_accuracy`` is now configured through the
153 :ref:`decimal_accuracy` screen.
158 .. _getting_started_configuration-link:
160 Two configuration files are available:
162 * one for the client: ``~/.openerprc``
163 * one for the server: ``~/.openerp_serverrc``
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 ::
172 ./openerp-server -s or ./openerp-server --save
174 You can specify alternate configuration files with ::
176 -c CONFIG, --config=CONFIG specify alternate config file
178 Configure addons locations
179 ++++++++++++++++++++++++++
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
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.
197 .. versionadded:: 6.1
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.
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.
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.