This is the documentation for older versions of Odoo (formerly OpenERP).

See the new Odoo user documentation.

See the new Odoo technical documentation.

La Instalación de OpenERP

Whether you are from a small company investigating how OpenERP works, or you are part of the IT staff of a larger organization and have been asked to assess OpenERP's capabilities, your first requirement is to install it or to find a working installation.

La tabla debajo resumen las instalaciones variadas que serán descritas en las siguientes secciones.

Comparison of the different methods of installation on Windows or Linux

Método

Tiempo promedio

Nivel de complejidad

Notas

Demostración OpenERP

Sin instalación

Sencillo

Muy útil para una evaluación rápida por que no se requiere de alguna instalación.

Instalador de Windows Todo-en-uno

Unos pocos minutos

Sencillo

Muy útil para las evaluaciones rápidas por que estas instalan y el componente pre-configurado en la computadora (usando el cliente).

Instalación independiente en Windows

Media hora

Media

Permite que instales los componentes de diversos equipos. Pueden ponerse en producción.

Paquetes de Ubuntu Linux

Unos pocos minutos

Sencillo

Simple y rápida aunque los paquetes de Ubuntu no siempre estan actualizados.

Desde la fuente, para todos los sistemas Linux.

Más de media hora

Mediano a más complejo

Este es el método recomendado para ambientes de producción por que es fácil para mantenerlo actualizado.

Each time a new release of OpenERP is made, OpenERP supplies a complete Windows auto-installer for it. This contains all of the components you need – the PostgreSQL database server, the OpenERP application server and the web application client.

This auto-installer enables you to install the whole system in just a few mouse clicks. The initial configuration is set up during installation, making it possible to start using it very quickly as long as you do not want to change the underlying code. It is aimed at the installation of everything on a single PC, but you can later connect clients from other PCs, Macs and Linux boxes to it as well.

The first step is to download the OpenERP installer. At this stage you must choose which version to install – the stable version or the development version. If you are planning to put it straight into production we strongly advise you to choose the stable version.

Nota

Versión estable y versión de desarrollo

El desarrollo de OpenERP procede en dos rutas paralelas: versión estable y versión de desarrollo.

New functionality is integrated into the development branch. This branch is more advanced than the stable branch, but it can contain undiscovered and unfixed faults. A new development release is made every month or so, and OpenERP has made the code repository available so you can download the very latest revisions if you want.

The stable branch is designed for production environments. Releases of new functionality there are made only about once a year after a long period of testing and validation. Only bug fixes are released through the year on the stable branch.

Para descargar la versión de OpenERP para Windows, sigue estos pasos:

  1. Navega al sitio http://openerp.com

  2. Click the Pricing & Download Link at the bottom, then, under Windows, sign up/sign in and download All-in-One.

  3. Para traer la versión de demostración del instalador para Windows, actualmente openerp-allinone-setup-7.0.

  4. Guarda el archivo en tu PC - es de tamaño sustancial por que este descarga todo incluyendo el sistema de base de datos PostgreSQL, así que tomara algún tamaño.

To install OpenERP and its database, you must be signed in as an Administrator on your PC. Double- click the installer file to install it and accept the default parameters on each dialog box as you go.

If you had previously tried to install the all-in-one version of OpenERP, you will have to uninstall that first, because various elements of a previous installation could interfere with your new installation. Make sure that all Tiny ERP, OpenERP and PostgreSQL applications are removed: you are likely to have to restart your PC to finish removing all traces of them.

The OpenERP client can be opened, ready to use the OpenERP system, once you have completed the all-in-one installation. The next step consists of setting up the database, and is covered in the final section of this chapter Creando la base de datos.

Instalación independiente en Windows

System administrators can have very good reasons for wanting to install the various components of a Windows installation separately. For example, your company may not support the version of PostgreSQL or Python that is installed automatically, or you may already have PostgreSQL installed on the server you are using, or you may want to install the database server, application server and web server on separate hardware units.

For this situation, you can get separate installers for the OpenERP server and client from the same location as the all-in-one auto-installer. You will also have to download and install a suitable version of PostgreSQL independently.

You must install PostgreSQL before the OpenERP server, and you must also set it up with a user and password so that the OpenERP server can connect to it. OpenERP's web-based documentation gives full and current details.

Conectando Usuarios y otras PCs al servidor de OpenERP

Para conectar a otras computadoras al servidor de OpenERP, deberás iniciar el servidor de tal manera que sea visible a las otras PCs, e instala el cliente en cada una de estas PCs:

  1. Make your OpenERP server visible to other PCs by opening the Windows Firewall in the Control Panel, then ask the firewall to make an exception of the OpenERP server. In the Exceptions tab of Windows Firewall click Add a program... and choose OpenERP Server in the list provided. This step enables other computers to see the OpenERP application on this server.

  2. Instala el cliente de OpenERP (openerp-allinone-setup-7.0-latest.exe), el cual puede descargar de la misma manera que la descaga de otro software OpenERP, en las otras PCs.

Truco

Homologar versiones

You must make sure that the version of the client matches that of the server. The version number is given as part of the name of the downloaded file. Although it is possible that some different revisions of client and server will function together, there is no certainty about that.

To run the client installer on every other PC you will need to know the IP address of main machine. The installation is automated, so you just need follow the different installation steps.

Cuando tu instalación finalize el cliente comenzará el navegador predeterminado de tu máquina.

Nota

¿Por qué firmarse como usuario administrador?

You would not usually be signed in as a PC administrator when you are just running the OpenERP client, but if there have been problems in the installation it is easier to remain as an administrator after the installation so that you can make any necessary fixes than to switch users as you alternate between roles as a tester and a software installer.

To Start web client, Open any browser and just write http://localhost:8069/ or http://0.0.0.0:8069/ If you want to access it on different machine just need to set your machin's IP address instead of localhost like : 192.168.1.1:8069 There is No database found, you must create one then you have successfully connected to an OpenERP server containing, as yet, no databases.

Nota

Modos de conexión

In its default configuration at the time of writing, the OpenERP client connects to port 8069 on the server using the XML-RPC protocol (from Linux) or port 8070 using the NET-RPC protocol instead (from Windows). You can use any protocol from either operating system. NET-RPC is quite a bit quicker. OpenERP can run XML-RPC, but not NET-RPC, as a secure connection.

Resolviendo errores con una instalación de Windows

Si no puedes hacer que OpenERP funcione despues de instalarlo en tu sistema Windows, encontrarás algunas ideas para resolverlo a continuación:

  1. Is the OpenERP Server working? Signed in to the server as an administrator, stop and restart the service using Stop Service and Start Service from the menu Start ‣ Programs ‣ OpenERP Server .

  2. Is the OpenERP Server set up correctly? Signed in to the server as Administrator, open the file openerp-server.conf in C:\Program Files\OpenERP AllInOne and check its content. This file is generated during installation with information derived from the database. If you see something strange it is best to entirely reinstall the server from the demonstration installer rather than try to work out what is happening.

    /doc_static/7.0/_images/terp_server_conf.png

    Typical OpenERP configuration file

  3. Is your PostgreSQL running? Signed in as administrator, select Stop Service from the menu Start ‣ Programs ‣ PostgreSQL. If after a couple of seconds, you read The PostgreSQL4OpenERP service has stopped then you can be reasonably sure that the database server was working. Restart PostgreSQL.

  4. Is the database accessible? Still in the PostgreSQL menu, start the pgAdmin III application which you can use to explore the database. Double-click the PostgreSQL4OpenERP connection. You can find the password in the OpenERP server configuration file. If the database server is accessible you will be able to see some information about the empty database. If it is not, an error message will appear.

  5. ¿Esta correctamente instalado tu programa cliente? Si el cliente de OpenERP no ha iniciado, lo más rápido es reinstalarlo.

  6. Can remote client computers see the server computer at all? Check this by opening a command prompt window (enter cmd in the window Start ‣ Run... ) and enter ping <address of server> there (where <address of server> represents the IP address of the server). The server should respond with a reply.

  7. ¿Cambiaste alguno de los parametros del servidor? En este punto en la instalación del número de puerto del servidor deberá ser de 8069 usando el protocolo XML-RPC.

  8. Is there anything else in the server's history that can help you identify the problem? Open the file openerp-server.log in C:\Program Files\OpenERP AllInOne(which you can only do when the server is stopped) and scan through the history for ideas. If something looks strange there, contributors to the OpenERP forums can often help identify the reason.

Instalación en Linux (Ubuntu)

This section guides you through installing the OpenERP server and client on Ubuntu, one of the most popular Linux distributions. It assumes that you are using a recent release of Desktop Ubuntu with its graphical user interface on a desktop or laptop PC.

Nota

Otras distribuciones de Linux

Installation on other distributions of Linux is fairly similar to installation on Ubuntu. Read this section of the book so that you understand the principles, then use the online documentation and the forums for your specific needs on another distribution.

For information about installation on other distributions, visit the documentation section by following Services ‣ Documentation on http://www.openerp.com. Detailed instructions are given there for different distributions and releases, and you should also check if there are more up to date instructions for the Ubuntu distribution as well.

Procedimiento técnico: Instalación inicial y configuración

Actualiza los paquetes de ubuntu para OpenERP y la instalación de pgadmin:

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get install openerp-server openerp-client pgadmin3

Para evitar tener algunas de las etiquetas sin traducir en el cliente, instala el paquete language-pack-gnome-TU_IDIOMA-base. El siguiente comando instalará el paquete de idiomas Español:

$ sudo apt-get install language-pack-gnome-es-base

PostgreSQL versión 8.4 ha sido usado al momento de escribir esta guía. Deberá reemplazarla con la versión que tengas en tu sistema y reemplazar los comandos de acuerdo a esta. Configuración de la base de datos PostgreSQL:

$ sudo vi /etc/postgresql/8.4/main/pg_hba.conf

Reemplaza la siguiente línea:

# “local” is for Unix domain socket connections only
local all all ident

con:

#”local” is for Unix domain socket connections only
local all all md5

Reinicia Postgres:

$ sudo /etc/init.d/postgresql-8.4 restart

* Restarting PostgreSQL 8.4 database server [ OK ]

Los siguientes comandos evitarán los problemas con /etc/init.d/openerp-web INIT script:

$ sudo mkdir /home/openerp

$ sudo chown openerp.nogroup /home/openerp

Create a user account called openerp with password “openerp” and with privileges to create Postgres databases:

$ sudo su postgres

$ createuser openerp -P

Enter password for new role: (openerp)

Enter it again:

Shall the new role be a superuser? (y/n) n

Shall the new role be allowed to create databases? (y/n) y

Shall the new role be allowed to create more new roles? (y/n) n

Salguese del usuario postgres:

$ exit

exit

Edita la configuración de OpenERP:

$ sudo vi /etc/openerp-server.conf

Reemplaza las siguientes dos lineas (no forzamos usar las bases de datos especificas y agregamos las contraseñas requeridas para ganar acceso a postgres):

db_name =

db_user = openerp

db_password = openerp

Ahora debemos reiniciar openerp-server:

$ sudo /etc/init.d/openerp-server restart

Restarting openerp-server: openerp-server.

Revise los logs:

$ sudo cat /var/log/openerp.log

OpenERP esta ahora ejecutandose, conectada a la base de datos PostgreSQL en el puerto 5432 y escuchando en el puerto 8069 y 8070

$ ps uaxww | grep -i openerp

openerp      5686  0.0  1.2  84688 26584 pts/7    Sl+  12:36   0:03 /usr/bin/python ./openerp-server.py
$ sudo lsof -i :8069

COMMAND  PID USER    FD   TYPE DEVICE SIZE/OFF NODE NAME

python  5686 openerp 3u  IPv4 116555      0t0  TCP *:8069 (LISTEN)
$ sudo lsof -i :8070

COMMAND  PID USER    FD   TYPE DEVICE SIZE/OFF NODE NAME

python  5686 openerp 5u  IPv4 116563      0t0  TCP *:8070 (LISTEN)
Inicia el ciente de OpenERP desde el navegador. La forma de registro de OpenERP

abre pero No database found you must create one!.

Although this installation method is simple and therefore an attractive option, it is better to install OpenERP using a version downloaded from http://openerp.com. The downloaded revision is likely to be far more up to date than that available from a Linux distribution.

Nota

Versiones de paquetes

Maintaining packages is a process of development, testing and publication that takes time. The releases in OpenERP packages are therefore not always the latest available. Check the version number from the information on the website before installing a package. If group differs (for example 7.0) then you may decide to install it because the differences may be minor – bug fixes rather than functionality changes between the package and the latest version.

Instalación manual del servidor de OpenERP

In this section you will see how to install OpenERP by downloading it from the site http://openerp.com, and how to install the libraries and packages that OpenERP depends on, onto a desktop version of Ubuntu. Here is a summary of the procedure:

  1. Navigate to the page http://openerp.com with your web browser,

  2. Click the Pricing & Download link on bottom side,

  3. Download the client and server files from the Sources section into your home directory (or some other location if you have defined a different download area).

To download the PostgreSQL database and all of the other dependencies for OpenERP from packages:

  1. Start Synaptic Package Manager, and enter the root password as required.

  2. Check that the repositories main , universe and restricted are enabled.

  3. Search for a recent version of PostgreSQL (such as postgresql-8.4 then select it for installation along with its dependencies.

  4. Select all of OpenERP's dependencies, an up-to-date list of which should be found in the installation documents on OpenERP's website, then click Apply to install them.

Nota

Lenguaje de programación Python

Python is the programming language that has been used to develop OpenERP. It is a dynamic, non-typed language that is object-oriented, procedural and functional. It comes with numerous libraries that provide interfaces to other languages and has the great advantage that it can be learnt in only a few days. It is the language of choice for large parts of NASA's, Google's and many other enterprises' code.

Para más información sobre Python, vaya a http://www.python.org.

Una vez que todas estas dependencias así como la base de datos esten instalados, procede con el servidor usando las instrucciones en este sitio web.

Open a terminal window to start the server with the command openerp-server as well as need to mention web client path, On terminal go to server source path, and give the command ./openerp-server --addons=../addons/7.0/,../web/7.0/addons which should result in a series of log messages as the server starts up. If the server is correctly installed, the message [...] waiting for connections... should show within 30 seconds or so, which indicates that the server is waiting for a client to connect to it.

/doc_static/7.0/_images/terps_startup_log.png

inicia el log de la consola de OpenERP

GTK

Clientes GTK esta depreciado para OpenERP v7.0

Instalación de un servidor OpenERP

You can install it from sources after installing its dependencies from packages as you did with the OpenERP server, but OpenERP has provided a simpler way to do this for the web client.

To install client-web follow the up-to-date instructions in the installation document on the website.

Its default setup corresponds to that of the OpenERP server you have just installed, so should connect directly at startup.

  1. At a terminal window type openerp-web to start the OpenERP Web server as mention above.

/doc_static/7.0/_images/web_welcome.png

Inicia el cliente web de OpenERP

You can verify the installation by opening a web browser on the server and navigating to http://localhost:8069 to connect to the OpenERP web version as shown in the figure Inicia el cliente web de OpenERP. You can also test this from another computer connected to the same network if you know the name or IP address of the server over the network – your browser should be set to http://<server_address>:8069 for this.

Creando la base de datos

You can connect other clients over the network to your Linux server. Before you leave your server, make sure you know its network address – either by its name (such as mycomputer.mycompany.net ) or its IP address (such as 192.168.0.123 ).

Nota

Diferentes redes

Communications between an OpenERP client and server are based on standard protocols. You can connect Windows clients to a Linux server, or vice versa, without problems. It is the same for Mac versions of OpenERP – you can connect Windows and Linux clients and servers to them.

To install an OpenERP client on a computer under Linux, repeat the procedure shown earlier in this section. You can connect different clients to the OpenERP server by modifying the connection parameters on each client. To do that, click the Change button in the connection dialog and set the following fields as needed:

  • Server : name or IP address of the server over the network,

  • Port : the port, whose default is 8069,

  • Connection protocol : XML-RPC.

It is possible to connect the server to the client using a secure protocol to prevent other network users from listening in, but the installation described here is for direct unencrypted connection.

Si tu servidor Linux esta protegido por un cortafuego deberás proveer un puerto de acceso.

8069 for users on other computers with OpenERP clients.

Verificando su instalación de Linux

You have used default parameters so far during the installation of the various components. If you have had problems, or you just want to set this up differently, the following points provide some indicators about how you can set up your installation.

Truco

psql y la herramienta pgAdmin

psql es un cliente sencillo, ejecutado desde la linea de comando, que esta mostrado por PostgreSQL. Este le permite ejecutar comandos de SQL en tu base de datos de OpenERP.

If you prefer a graphical utility to manipulate your database directly you can install pgAdmin III (it is commonly installed automatically with PostgreSQL on a windowing system, but can also be found at http://www.pgadmin.org/ ).

  1. The PostgreSQL database starts automatically and listens locally on port 5432 as standard: check this by entering sudo netstat -anpt at a terminal to see if port 5432 is visible there.

  2. The database system has a default role of postgres accessible by running under the Linux postgres user: check this by entering sudo su postgres -c psql at a terminal to see the psql startup message – then type \q to quit the program.

  3. If you try to start the OpenERP server from a terminal but get the message socket.error: (98, 'Address already in use') then you might be trying to start OpenERP while an instance of OpenERP is already running and using the sockets that you have defined (by default 8069 and 8070). If that is a surprise to you then you may be coming up against a previous installation of OpenERP or Tiny ERP, or something else using one or both of those ports.

    Type sudo netstat -anpt to discover what is running there, and record the PID. You can check that the PID corresponds to a program you can dispense with by typing ps aux | grep <PID> and you can then stop the program from running by typing sudo kill <PID>. You need additional measures to stop it from restarting when you restart the server.

  4. The OpenERP server has a large number of configuration options. You can see what they are by starting the server with the argument –help. By default the server configuration is stored in the file .terp_serverrc in the user's home directory (and for the postgres user that directory is /var/lib/postgresql .

  5. You can delete the configuration file to be quite sure that the OpenERP server is starting with just the default options. It is quite common for an upgraded system to behave badly because a new version server cannot work with options from a previous version. When the server starts without a configuration file it will write a new one once there is something non-default to write to it – it will operate using defaults until then.

  6. To verify that the system works, without becoming entangled in firewall problems, you can start the OpenERP client from a second terminal window on the server computer (which does not pass through the firewall). Connect using the XML-RPC protocol on port 8069 or NET-RPC on port 8070. The server can use both ports simultaneously. The window displays the log file when the client is started this way.

  7. The client setup is stored in the file .terprc in the user's home directory. Since a client can be started by any user, each user would have their setup defined in a configuration file in their own home directory.

  8. You can delete the configuration file to be quite sure that the OpenERP client is starting with just the default options. When the client starts without a configuration file it will write a new one for itself.

Consejo

One Server for Several Companies

You can start several OpenERP application servers on one physical computer server by using different ports. If you have defined multiple database roles in PostgreSQL, each connected through an OpenERP instance to a different port, you can simultaneously serve many companies from one physical server at one time.