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 --net_interface=NETINTERFACE specify the TCP IP address for netrpc
107 --net_port=NETPORT specify the TCP port for netrpc
108 --no-netrpc disable netrpc
109 --no-xmlrpc disable xmlrpc
110 -i INIT, --init=INIT init a module (use "all" for all modules)
111 --without-demo=WITHOUT_DEMO load demo data for a module (use "all" for all modules)
112 -u UPDATE, --update=UPDATE update a module (use "all" for all modules)
113 --stop-after-init stop the server after it initializes
114 --debug enable debug mode
115 -S, --secure launch server over https instead of http
116 --smtp=SMTP_SERVER specify the SMTP server for sending mail
118 Database related options
119 ++++++++++++++++++++++++
123 -d DB_NAME, --database=DB_NAME
124 specify the database name
125 -r DB_USER, --db_user=DB_USER
126 specify the database user name
127 -w DB_PASSWORD, --db_password=DB_PASSWORD
128 specify the database password
129 --pg_path=PG_PATH specify the pg executable path
130 --db_host=DB_HOST specify the database host
131 --db_port=DB_PORT specify the database port
133 Internationalization options
134 ++++++++++++++++++++++++++++
136 Use these options to translate OpenERP to another language.See i18n
137 section of the user manual. Option '-l' is mandatory.::
139 -l LANGUAGE, --language=LANGUAGE
140 specify the language of the translation file. Use it
141 with --i18n-export and --i18n-import
142 --i18n-export=TRANSLATE_OUT
143 export all sentences to be translated to a CSV file
145 --i18n-import=TRANSLATE_IN
146 import a CSV file with translations and exit
147 --modules=TRANSLATE_MODULES
148 specify modules to export. Use in combination with
151 Options from previous versions
152 ++++++++++++++++++++++++++++++
154 Some options were removed in OpenERP version 6. For example,
155 ``price_accuracy`` is now configured through the
156 :ref:`decimal_accuracy` screen.
161 .. _getting_started_configuration-link:
163 Two configuration files are available:
165 * one for the client: ``~/.openerprc``
166 * one for the server: ``~/.openerp_serverrc``
168 If they are not found, the server and the client will start with a
169 default configuration. Those files follow the convention used by
170 python's ConfigParser module. Please note that lines beginning with
171 "#" or ";" are comments. The client configuration file is
172 automatically generated upon the first start. The sezrver
173 configuration file can automatically be created using the command ::
175 ./openerp-server -s or ./openerp-server --save
177 You can specify alternate configuration files with ::
179 -c CONFIG, --config=CONFIG specify alternate config file
181 Configure addons locations
182 ++++++++++++++++++++++++++
184 By default, the only directory of addons known by the server is
185 server/bin/addons. It is possible to add new addons by
187 - copying them in server/bin/addons, or creating a symbolic link to
188 each of them in this directory, or
189 - specifying another directory containing addons to the server. The
190 later can be accomplished either by running the server with the
191 ``--addons-path=`` option, or by configuring this option in the
192 openerp_serverrc file, automatically generated under Linux in your
193 home directory by the server when executed with the ``--save``
194 option. You can provide several addons to the ``addons_path`` =
195 option, separating them using commas.
200 .. versionadded:: 6.1
202 To run the OpenERP server, the conventional approach is to use the
203 `openerp-server` script. It loads the :ref:`openerp library`, sets a
204 few configuration variables corresponding to command-line arguments,
205 and starts to listen to incoming connections from clients.
207 Depending on your deployment needs, you can write such a start-up script very
208 easily. We also recommend you take a look at an alternative tool called
209 `openerp-command` that can, among other things, launch the server.
211 Yet another alternative is to use a WSGI-compatible HTTP server and let it call
212 into one of the WSGI entry points of the server.