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 will need Bazaar_ to pull the source from Launchpad. Bazaar is a version control system that helps you track project history over time and collaborate efficiently. You may have to create an account on Launchpad to be able to collaborate on OpenERP development. Please refer to the Launchpad and Bazaar documentation to install and setup your development environment.
15 The running example of this section is based on an Ubuntu environment. You may have to adapt the steps according to your system. Once your working environment is ready, prepare a working directory that will contain the sources. For a ``source`` base directory, type::
17 mkdir source;cd source
19 OpenERP provides a setup script that automatizes the tasks of creating a shared repository and getting the source code. Get the setup script of OpenERP by typing::
21 bzr cat -d lp:~openerp-dev/openerp-tools/trunk setup.sh | sh
23 This will create the following two files in your ``source`` directory::
25 -rw-rw-r-- 1 openerp openerp 5465 2012-04-17 11:05 Makefile
26 -rw-rw-r-- 1 openerp openerp 2902 2012-04-17 11:05 Makefile_helper.py
28 If you want some help about the available options, please type::
32 Next step is to initialize the shared repository and download the sources. Get the current trunk version of OpenERP by typing::
36 This will create the following structure inside your ``source`` directory, and fetch the latest source code from ``trunk``::
38 drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 addons
39 drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 client
40 drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 client-web
41 drwxrwxr-x 2 openerp openerp 4096 2012-04-17 11:10 dump
42 drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 misc
43 drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 server
44 drwxrwxr-x 3 openerp openerp 4096 2012-04-17 11:10 web
46 Some dependencies are necessary to use OpenERP. Depending on your environment, you might have to install the following packages::
48 sudo apt-get install graphviz ghostscript postgresql
49 python-imaging python-matplotlib
51 Next step is to initialize the database. This will create a new openerp role::
55 Finally, launch the OpenERP server::
59 Testing your installation can be done on http://localhost:8069/ . You should see the OpenERP main login page.
61 .. _Launchpad: https://launchpad.net/
62 .. _Bazaar: http://bazaar.canonical.com/en/
67 .. _getrting_started_configuration-link:
69 Two configuration files are available:
71 * one for the client: ~/.openerprc
72 * one for the server: ~/.openerp_serverrc
74 Those files follow the convention used by python's ConfigParser module.
76 Lines beginning with "#" or ";" are comments.
78 The client configuration file is automatically generated upon the first start. The one of the server can automatically be created using the command: ::
82 If they are not found, the server and the client will start with the default configuration.
85 **Server Configuration File**
87 The server configuration file .openerp_serverrc is used to save server startup options. Here is the list of the available options:
90 Address to which the server will be bound
93 Port the server will listen on
96 Name of the database to use
99 Username used when connecting to the database
102 File used to translate OpenERP to your language
105 File used to export the language OpenERP use
108 Use this language as the language of the server. This must be specified as an ISO country code, as specified by the W3C.
114 init a module (use "all" for all modules)
117 update a module (use "all" for all modules)
120 Upgrade/install/uninstall modules
123 specify the database name
126 specify the database user name
129 specify the database password
132 specify the pg executable path
135 specify the database host
138 specify the database port
141 Specify modules to export. Use in combination with --i18n-export
144 You can create your own configuration file by specifying -s or --save on the server command line. If you would like to write an alternative configuration file, use -c <config file> or --config=<config file>
145 Here is a basic configuration for a server::
154 interface = 127.0.0.1
157 Full Example for Server V5.0 ::
172 index = http://www.openerp.com/documentation/user-manual/
173 context = http://www.openerp.com/scripts/context_index.php
180 recipient = support@openerp.com
189 default_path = /home/user
193 form_tab_orientation = 0
200 pixmaps = /usr/share/pixmaps/openerp-client/
201 share = /usr/share/openerp-client/
217 --version show program version number and exit
218 -h, --help show this help message and exit
219 -c CONFIG, --config=CONFIG
220 specify alternate config file
221 -s, --save save configuration to ~/.terp_serverrc
222 -v, --verbose enable debugging
223 --pidfile=PIDFILE file where the server pid will be stored
224 --logfile=LOGFILE file where the server log will be stored
225 -n INTERFACE, --interface=INTERFACE
226 specify the TCP IP address
227 -p PORT, --port=PORT specify the TCP port
228 --net_interface=NETINTERFACE
229 specify the TCP IP address for netrpc
230 --net_port=NETPORT specify the TCP port for netrpc
231 --no-netrpc disable netrpc
232 --no-xmlrpc disable xmlrpc
233 -i INIT, --init=INIT init a module (use "all" for all modules)
234 --without-demo=WITHOUT_DEMO
235 load demo data for a module (use "all" for all
237 -u UPDATE, --update=UPDATE
238 update a module (use "all" for all modules)
239 --stop-after-init stop the server after it initializes
240 --debug enable debug mode
241 -S, --secure launch server over https instead of http
242 --smtp=SMTP_SERVER specify the SMTP server for sending mail
244 Database related options:
245 -------------------------
247 -d DB_NAME, --database=DB_NAME
248 specify the database name
249 -r DB_USER, --db_user=DB_USER
250 specify the database user name
251 -w DB_PASSWORD, --db_password=DB_PASSWORD
252 specify the database password
253 --pg_path=PG_PATH specify the pg executable path
254 --db_host=DB_HOST specify the database host
255 --db_port=DB_PORT specify the database port
257 Internationalization options:
258 -----------------------------
260 Use these options to translate OpenERP to another language.See i18n
261 section of the user manual. Option '-l' is mandatory.
263 -l LANGUAGE, --language=LANGUAGE
264 specify the language of the translation file. Use it
265 with --i18n-export and --i18n-import
266 --i18n-export=TRANSLATE_OUT
267 export all sentences to be translated to a CSV file
269 --i18n-import=TRANSLATE_IN
270 import a CSV file with translations and exit
271 --modules=TRANSLATE_MODULES
272 specify modules to export. Use in combination with
275 Options from previous versions:
276 -------------------------------
277 Some options were removed in version 6. For example, ``price_accuracy`` is now
278 configured through the :ref:`decimal_accuracy` screen.