OpenERP Appliance

Collaboration Works

Magento 1.3.2.3 installer for ubuntu 9.04

OpenERP Appliance & All-In-One & Magento Forum

This script automates the setting up of Magento 1.3.2.3 on Ubuntu 9.0.4 Server & Desktop.

New update! Magento 1.3.2.4 installer

Magento (http://www.magentocommerce.com/) is an Open Source ecommerce web application.

Requirements: A fresh installation of Ubuntu 9.0.4 Server or Desktop without Apache nor Mysql. Only the core of the system is needed, so during the installation of your Ubuntu Server don’t select software to install like LAMP Server in the “Software Selection” menu (except for OpenSSH Server). This script installs Apache, PHP and Mysql; and expects to deal with default config files.
TIP: test this script within a Virtual Machine after installing Ubuntu 9.04 from scratch. Run the virtual machine in a bridged network (host and guest have same subnet and can be reached from the LAN).

Run the script as non-root with the following commands:

$ gzip -d Magento-1.3.2.3-installer-for-ubuntu9.04.sh.gz
$ chmod +x Magento-1.3.2.3-installer-for-ubuntu9.04.sh
$ ./Magento-1.3.2.3-installer-for-ubuntu9.04.sh

You will be asked for:
1) Mysql root password
2) IP address your OpenERP Web service will be listening on
3) Magento Admin username & Password
4) Your LANG, etc.

Magento Translations can be found at http://www.magentocommerce.com/langs

Example of how to install the Spanish (Spain) translation with modern theme (Full package Download):

sudo apt-get install unzip -y
unzip es_ES_modern_full_package.zip
sudo cp -r app/locale/es_ES/ /var/www/magento/app/locale/
sudo cp -r app/design/frontend/default/modern/locale/es_ES/ /var/www/magento/app/design/frontend/default/default/locale/
sudo chown -R www-data.www-data /var/www/magento/app

Refresh Magento Cache from Magento Admin Panel -> System-> Cache Management

The output of the script ends with:

MySQL “root” Administrator Password: mysqlpassword
MySQL Database Name for Magento = magentodb
MySQL Database Administrator for Magento = magentodbadmin
MySQL Database Administrator’s Password for Magento = magentodbpasswd

Magento Admin Username = admin
Magento Admin Password = password
Magento Admin First Name: myfirstname
Magento Admin Last Name: mylastname
Magento Admin Email Address: mymail@addr.com

Magento default locale = en_US
Magento default timezone = America/Los_Angeles
Magento default currency = USD

Add “magentoshop.com” to your DNS System!
Check your Magento URL with a browser: http://magentoshop.com/magento

July 27, 2009 Posted by | eCommerce, Scripting, Turnkey, Ubuntu Server Canonical | | 23 Comments

Business Analysis On Click With Open ERP BI (Business Intelligence)

I include below an interesting link that shows what current developments are being made on Open ERP BI :

“Here is an example of sales data analysis using Open ERP Business Intelligence. In this example one can see how end user can easily configure BI cube and analyse sales data for – product category wise total sale, sale of particular product in particular region, date wise product sale, product sale based on number of unit, further end user can increase criteria for analysis as per need.”

“Please note that these developments are still a prototype developed on trunk version. It’s fully working but not yet fully integrated in the main branch of Open ERP. We plan to integrate new client developments, like BI and Webmail in the new version of the web client, because this new version will integrate a client side plugin system. So, it’s better to wait for a few months before using the BI system, the v5.2 (or v5.4).”

http://openerp-team.blogspot.com/2009/05/business-analysis-on-click-with-open.html

July 2, 2009 Posted by | ERP | , | 2 Comments

Adding OpenERP 5.0 Modules for Spain on Ubuntu 9.04 (in Spanish)

En las anteriores entradas de este blog se ha detallado el procedimiento técnico de instalación de OpenERP Server y OpenERP Web en Ubuntu 9.0.4 . Asimismo se ha proporcionado un shell script para facilitar y automatizar la instalación y configuración de ambos componentes.

This post is obsolete. Please consider the following update: http://opensourceconsulting.wordpress.com/2009/09/04/adding-openerp-5-0-3-modules-for-spain-on-ubuntu-8-04-lts-in-spanish/

El siguiente paso es generar un plan contable e impuestos desde la plantilla correspondiente a nuestro país. Actualmente no figuran como oficiales los módulos OpenERP para España, así que será necesario descargarlos desde launchpad.net (alojamiento de código fuente que utiliza el sistema de control de versiones Bazaar).

Descarga de las versiones más recientes de los módulos openerp-spain y trunk-extra-addons. Copiamos los nuevos módulos al directorio /usr/lib/openerp-server/addons/ :

sudo apt-get -y install bzr
bzr branch lp:openerp-spain
sudo chown -R openerp.root openerp-spain
sudo cp -r openerp-spain/l10n_es/* /usr/lib/openerp-server/addons/
sudo cp -r openerp-spain/l10n_es_extras/* /usr/lib/openerp-server/addons
sudo cp -r openerp-spain/l10n_es_ES/* /usr/lib/openerp-server/addons/
sudo cp -r openerp-spain/extra_addons/* /usr/lib/openerp-server/addons
sudo cp -r openerp-spain/l10n_ca_ES/* /usr/lib/openerp-server/addons
sudo cp -r openerp-spain/l10n_gl_ES/* /usr/lib/openerp-server/addons
sudo cp -r openerp-spain/l10n_eu_ES/* /usr/lib/openerp-server/addons

bzr branch lp:~openerp-commiter/openobject-addons/trunk-extra-addons
sudo chown -R openerp.root trunk-extra-addons/
sudo cp -r trunk-extra-addons/account_payment_extension/ /usr/lib/openerp-server/addons/
sudo cp -r trunk-extra-addons/sale_payment/ /usr/lib/openerp-server/addons/
sudo cp -r trunk-extra-addons/label/ /usr/lib/openerp-server/addons/
sudo cp -r trunk-extra-addons/partner_spam/ /usr/lib/openerp-server/addons/
sudo cp -r trunk-extra-addons/smtpclient /usr/lib/openerp-server/addons/

Donde:

* l10n_es_ES para las traducciones al castellano (directorio vacío)
* l10n_ca_ES para las traducciones al català
* l10n_gl_ES para las traducciones al galego (directorio vacío)
* l10n_eu_ES para las traducciones al euskera (directorio vacío)

Desde el cliente OpenERP (Web ó GTK): Administración -> Módulos -> Actualizar Lista de Módulos . Esta opción actualiza la lista de módulos y añade los nuevos en la lista de los “no instalados” (18 nuevos módulos añadidos)

Crear una nueva base de datos desde el cliente OpenERP con la opción de no instalar datos de prueba (de otro modo se generaría un error durante el procedimiento de instalación de los módulos). Una vez creada la base de datos,  NO continuar con el asistente de configuración (hacer click en “Saltar paso” cuando aparezca la pantalla de “Definir ejercicios fiscales y seleccionar plan contable“). De esta manera evitamos los errores que surgirían al instalar la plantilla contable y los ejercicios.

Desde el cliente OpenERP: Administración -> Módulos -> Instalar el nuevo módulo “l0n_ES_pyme_install” y todas sus dependencias.

Crear los topónimos del Estado Español (crear las provincias mediante el asistente que se ejecuta automáticamente al instalar el anterior módulo)

Cear cuentas contables a partir de la plantilla (mediante el menu Gestion financiera/Configuracion/Contabilidad financiera/Plantillas/Generar plan contable a partir de una plantilla de plan contable).

Instalar modulo l10n_ES_pyme_custom y todas sus dependencias (este modulo crea ejercicios para 2009 y 2010).

REFERENCIAS:

http://www.openerpsite.com/modulos-de-localizacion-espanola/322.html
http://openerp.com/forum/
http://www.openerpsite.com/tag/instalar-modulo-openerp
http://www.openerpsite.com/proyectos-openerp
http://www.openerpsite.com/category/manuales-tecnicos-openerp
http://www.aulaerp.com/
https://translations.launchpad.net/openobject
http://doc.openerp.com/contribute/using_bazaar.html#installing-bazaar

En las anteriores entradas de este blog se ha detallado el procedimiento técnico de instalación de OpenERP Server y OpenERP Web en Ubuntu 9.0.4 . Asimismo se ha facilitado un shell script para facilitar y automatizar la instalación y configuración de ambos componentes.El siguiente paso es generar un plan contable e impuestos desde la plantilla correspondiente a nuestro país. Actualmente no figuran como oficiales los módulos OpenERP para España, así que será necesario descargarlos desde launchpad.net (alojamiento de código fuente que utiliza el sistema de control de versiones Bazaar).sudo apt-get -y install bzr
bzr branch lp:openerp-spain
sudo chown -R openerp.root openerp-spain
sudo cp -r openerp-spain/l10n_es/* /usr/lib/openerp-server/addons/
sudo cp -r openerp-spain/l10n_es_extras/* /usr/lib/openerp-server/addons
sudo cp -r openerp-spain/l10n_es_ES/* /usr/lib/openerp-server/addons/
sudo cp -r openerp-spain/extra_addons/* /usr/lib/openerp-server/addons
sudo cp -r openerp-spain/l10n_ca_ES/* /usr/lib/openerp-server/addons
sudo cp -r openerp-spain/l10n_gl_ES/* /usr/lib/openerp-server/addons
sudo cp -r openerp-spain/l10n_eu_ES/* /usr/lib/openerp-server/addons

Estructura

bzr branch lp:~openerp-commiter/openobject-addons/trunk-extra-addons
sudo chown -R openerp.root trunk-extra-addons/
sudo cp -r trunk-extra-addons/account_payment_extension/ /usr/lib/openerp-server/addons/
sudo cp -r trunk-extra-addons/sale_payment/ /usr/lib/openerp-server/addons/
sudo cp -r trunk-extra-addons/label/ /usr/lib/openerp-server/addons/
sudo cp -r trunk-extra-addons/partner_spam/ /usr/lib/openerp-server/addons/
sudo cp -r trunk-extra-addons/smtpclient /usr/lib/openerp-server/addons/

July 1, 2009 Posted by | ERP, Turnkey | | 10 Comments

openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh

This script automates the setting up of openerp-server 5.0.0-3-1 + openerp-client 5.0.0-3-1 + openerp-web 5.0.1 for Ubuntu Server 9.0.4 and Ubuntu Desktop 9.0.4

This post is now obsolete. Please consider the following update: http://opensourceconsulting.wordpress.com/2009/08/13/openerp-allinone-setup-5-0-2-0-sh/

Requirements: A fresh installation of Ubuntu Server 9.0.4 or Ubuntu Desktop 9.0.4. In both scenarios Apache & Postgres are installed by this script. This means that the script expects these programs to have their default config files. TIP: test this script within a Virtual Machine after installing Ubuntu 9.04 from scratch.

Run the script as non-root with the following commands:

$ sudo apt-get install gzip
$ gzip -d openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh.gz
$ chmod +x openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh
$ ./openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh

You will be asked for:
1) OpenERP Administrator’s password
2) IP address your OpenERP Web service will be listening on
3) Your LANG

The installation process will stop with the following warning if you launch the script through a SSH session:
“This command may affect the current SSH connections. Do you want to continue (y | n)?”
Solution: Press “y” to complete the rest of the process.

The output of the script ends with:

————————————————————————————————————————————————
THE REMAINING STEPS CAN BE CONFIGURED FROM THE WEB INTERFACE (OPENERP WEB)

1. Register the DNS Name “openerpweb.com” with its corresponding IP address (192.168.x.x).
“openerpweb.com” is the external URL of OpenERP Web. Make sure this URL is reachable by your Web clients (Open ERP users)
In Linux this can be done locally by adding the following line to /etc/hosts file:

192.168.x.x openerpweb.com

The hosts file is located in different locations in different operating systems and versions: “http://en.wikipedia.org/wiki/Hosts_file”
The hosts file is a computer file used to store information on where to find a node on a computer network.
This file maps hostnames to IP addresses. The hosts file is used as a supplement to (or a replacement of) the Domain Name System (DNS) on networks of varying sizes. Unlike DNS, the hosts file is under the control of the local computer’s administrator

2. Check with a browser your OpenERP Web URL: “http://openerpweb.com”

3. WELCOME TO OPENERP: -> Click on “Databases” -> CREATE A NEW DATABASE:
3.1  Super Administrator Password: admin
3.2  New Name of the database: xxx
3.3  Load Demo Data (y/n)
3.4  Default language: xxx
3.5  Administrator Password: xxx
3.6  Confirm Administrator Password: xxx

4. WELCOME TO OPENERP:
4.1 Database: xxx
4.2 Administrator Username: admin
4.3 Administrator Password:  xxx
4.4 Click on “Login”

5. INSTALLATION & CONFIGURATION. You will now be asked to install and configure modules and users required by your Enterprise
5.1 Click on “Logout”

6. WELCOME TO OPENERP: You can now log in with the following users
6.1 User “demo” / Password “demo”, in case you clicked on “Load Demo Data”
6.2 User “admin” / Password “xxx”
6.3 Users created by you during step #4
————————————————————————————————————————————————

This script automates the setting up of openerp-server 5.0.0-3-1 + openerp-client 5.0.0-3-1 + openerp-web 5.0.1 for Ubuntu Server 9.0.4 and Ubuntu Desktop 9.0.4

Requirements: A fresh installation of Ubuntu Server 9.0.4 or Ubuntu Desktop 9.0.4. In both scenarios Apache & Postgres are installed by this script. This means that the script expects these programs to have their default config files. TIP: test this script within a Virtual Machine after installing Ubuntu 9.04 from scratch.

Run the script with the following commands:

$ chmod +x openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh
$ ./openerp-server-5.0-openerp-web-5.0.1-installation-script-on-ubuntu-9.0.4.sh

You will be asked for:
1) OpenERP Administrator’s password
2) IP address your OpenERP Web service will be listening on
3) Your LANG

The installation process will stop with the following warning if you launch the script through a SSH session:
“This command may affect the current SSH connections. Do you want to continue (y | n)?”
Solution: Press “y” to complete the rest of the process.

The output of the script ends with:

————————————————————————————————————————————————
THE REMAINING STEPS CAN BE CONFIGURED FROM THE WEB INTERFACE (OPENERP WEB)

1. Register the DNS Name “openerpweb.com” with its corresponding IP address (192.168.x.x).
“openerpweb.com” is the external URL of OpenERP Web. Make sure this URL is reachable by your Web clients (Open ERP users)
In Linux this can be done locally by adding the following line to /etc/hosts file:

192.168.x.x openerpweb.com

The hosts file is located in different locations in different operating systems and versions: “http://en.wikipedia.org/wiki/Hosts_file”
The hosts file is a computer file used to store information on where to find a node on a computer network.
This file maps hostnames to IP addresses. The hosts file is used as a supplement to (or a replacement of) the Domain Name System (DNS) on networks of varying sizes. Unlike DNS, the hosts file is under the control of the local computer’s administrator

2. Check with a browser your OpenERP Web URL: “http://openerpweb.com”

3. WELCOME TO OPENERP: -> Click on “Databases” -> CREATE A NEW DATABASE:
3.1  Super Administrator Password: admin
3.2  New Name of the database: xxx
3.3  Load Demo Data (y/n)
3.4  Default language: xxx
3.5  Administrator Password: xxx
3.6  Confirm Administrator Password: xxx

4. WELCOME TO OPENERP:
4.1 Database: xxx
4.2 Administrator Username: admin
4.3 Administrator Password:  xxx
4.4 Click on “Login”

5. INSTALLATION & CONFIGURATION. You will now be asked to install and configure modules and users required by your Enterprise
5.1 Click on “Logout”

6. WELCOME TO OPENERP: You can now log in with the following users
6.1 User “demo” / Password “demo”, in case you clicked on “Load Demo Data”
6.2 User “admin” / Password “xxx”
6.3 Users created by you during step #4
————————————————————————————————————————————————

June 29, 2009 Posted by | ERP, Scripting, Turnkey, Ubuntu Desktop, Ubuntu Server Canonical | , | 33 Comments

OpenERP presentations

June 19, 2009 Posted by | ERP | , , | 3 Comments

Installation of OpenERP Server 5.0, OpenERP GTK Client 5.0 and OpenERP Web Client 5.0.1 on Ubuntu Server 9.0.4

This article will show you how to set up openerp-server 5.0.0-3-1 + openerp-client 5.0.0-3-1 + openerp-web 5.0.1 for Ubuntu Server 9.0.4 and Ubuntu Desktop 9.0.4

This post is now obsolete. Please consider the following update: http://opensourceconsulting.wordpress.com/2009/08/13/openerp-allinone-setup-5-0-2-0-sh/

Introduction

Open ERP (formerly named Tiny ERP) is the leader open-source ERP/CRM system written mostly in Python and initiated in Belgium. It offers a three-tier web architecture, ease of use and flexibility.

With more than 1000 downloads per day, Open ERP is the most admired and the world’s fastest growing and used free open source management software solution in the world. Small and medium sized companies are now encouraged to use ERP.

Open ERP is very modular, each adoption produces new modules. So they can be installed optionally or not, depending on the need of each enterprise. More than 350 modules of different kinds are available: accounting, finance, stock management, manufacturing, services management, customer relations, sales, project management, document management, internal organization, human resources, direct marketing, e-commerce, point of sale, payroll,… And about 20 modules are produced monthly!

For Open Source software, experience has shown that there’s no need to train users for several months on the system, because they can just download it and use it directly. To make this process of learning fast and effective, Open ERP has taken several steps with its large partner network and community e.g. Forum and IRC which are platforms to discuss common topics among community and get help, Open ERP Planet is used to announce new developments in Open ERP, Launchpad is a unique collaboration and Bazaar code hosting platform for software projects. Other then these, detail Documentation is available which serve as a guide to understand and get started with Open ERP.

The latest version of OpenERP (5.0) was released in February 10th 2009. Canonical’s Ubuntu 9.0.4 is the first Linux distribution that provides this release. We will probably have to wait a few months until other distributions (Fedora 12, OpenSuSE 11.3, CentOS, etc) ease the latest updates of OpenERP 5.x. Nevertheless, all these major distributions already offer tinyerp-server and client release 4.2.3 (without including openerp-web).

Major troubles during the setting up

The most complicated part is with openerp-web 5.0.1 because of its dependency on TurboGears 1.0.8 . TurboGears 1.0.8 is not supported with the default Ubuntu 9.04 python version (python2.6)

OpenERP Web client 5.0.2 is still under development. This release is being migrated to CherryPy3 dropping the TurboGears framework as a major step to make the Web Client much more faster and easier to deploy. This will greatly reduce the pain of getting started with and deploying of OpenERP Web client. The number of third party dependencies will be reduced to 3-4 pure Python libraries. The initial test results offer almost 3-5 time speed improvement.

The default openerp-server and openerp-web INIT scripts cannot launch their corresponding services as non-root without fixing some technical issues. I will detail what configuration files and scripts have to be modified to avoid this.

Technical procedure. Initial installation and configuration

Upgrade of Ubuntu packages and installation of openerp and pgadmin:

$ sudo apt-get update

$ sudo apt-get upgrade

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

To avoid having some of the labels untranslated in the GTK client, install the language-pack-gnome-YOURLANG-base package. The following command installs the spanish language pack:

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

Postgres Database configuration:

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

Replace the following line:

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

with:

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

Restart Postgres:

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

* Restarting PostgreSQL 8.3 database server [ OK ]

The following two commands will avoid problems with /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

Quit from user postgres

$ exit

exit

Edit OpenERP configuration file:

$ sudo vi /etc/openerp-server.conf

Replace the following two lines (we don’t force to use a specific database and we add the required password to gain access to postgres):

db_name =

db_user = openerp

db_password = openerp

Troubles with Python releases: Python 2.6 is not yet supported by OpenERP 5.0, but it is the default Python release on Ubuntu 9.0.4. We need to launch OpenERP 5.0 with Python 2.5 or earlier. There’s also a problem with python-xml package in Ubuntu so we will reinstall it.

Python 2.5 setting up:

$ sudo apt-get install python2.5 python2.5-dev python-profiler

Reinstall python-xml:

$ wget http://freefr.dl.sourceforge.net/sourceforge/pyxml/PyXML-0.8.4.tar.gz

$ tar xvzf PyXML-0.8.4.tar.gz

$ cd PyXML-0.8.4/

$ sudo python2.5 setup.py install

Make the following symbolic link:

$ sudo ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/

Force openerp-server to be launched with Python2.5:

$ cd /usr/bin/

$ sudo cp openerp-server openerp-server.ORIG

$ sudo vi openerp-server

Replace the following line:

exec /usr/bin/python ./openerp-server.py $@

with

exec /usr/bin/python2.5 ./openerp-server.py $@

We can now restart openerp-server:

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

Restarting openerp-server: openerp-server.

Check out the logs:

$ sudo cat /var/log/openerp.log

[2009-06-14 21:06:39,314] INFO:server:version – 5.0.0

[2009-06-14 21:06:39,314] INFO:server:addons_path – /usr/lib/openerp-server/addons

[2009-06-14 21:06:39,314] INFO:server:database hostname – localhost

[2009-06-14 21:06:39,315] INFO:server:database port – 5432

[2009-06-14 21:06:39,315] INFO:server:database user – openerp

[2009-06-14 21:06:39,315] INFO:objects:initialising distributed objects services

[2009-06-14 21:06:39,502] INFO:web-services:starting XML-RPC services, port 8069

[2009-06-14 21:06:39,502] INFO:web-services:starting NET-RPC service, port 8070

[2009-06-14 21:06:39,502] INFO:web-services:the server is running, waiting for connections…

OpenERP is now up and running, connected to Postgres database on port 5432 and listening on ports 8069 and 8070

$ ps uaxww | grep -i openerp

root   2276  0.0  2.3 185576 23708 ?        Sl   13:09   0:00 /usr/bin/python2.5 ./openerp-server.py –config=/etc/openerp-server.conf

$ sudo lsof -i :8069

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

python2.5 2276 openerp 3u IPv4 6515 TCP localhost:8069 (LISTEN)

$ sudo lsof -i :8070

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

python2.5 2276 openerp 5u IPv4 6520 TCP *:8070 (LISTEN)

Creation of a new database for OpenERP Server with OpenERP GTK Client (Optional)

Launch openerp-client and create a new database for openerp-server:

$ openerp-client

File/Archivo -> Databases/Bases de Datos -> New Database/Nueva Base de Datos

Super-administrator password: “admin”
New database name: “openerp”
Administrator password: “openerp”
Confirm password: “openerp”


If the previous window gets frozen, just kill it off and restart openerp-client.

Fixing OpenERP Server INIT script bug

$ sudo vi /etc/openerp-server.conf

Comment out or remove the following line:

# The file where the server pid will be stored (default False).
#pidfile = /var/run/openerp.pid

Edit the init script:

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

Add the following line to the beginning of the init script:

USER=openerp

Setting up OpenERP Web client

The most complicated part is with openerp-web because TurboGears 1.0.8 is not supported with the default Ubuntu 9.04 python version (python2.6). Basically we want to avoid the following error:

$ sudo easy_install -U openerp-web
Running openerp-web-5.0.1-0/setup.py -q bdist_egg –dist-dir /tmp/easy_install-SJE_07/openerp-web-5.0.1-0/egg-dist-tmp-NFndZn
Error: python-xml >= 0.8.4 (PyXML, XML Tools for python) is required.
error: Setup script exited with 1

Then, to use easy_install for python2.5:

$ sudo apt-get install python2.5-setuptools

You must remove the default soft link to easy_install2.6

$ sudo rm /usr/bin/easy_install

Then create the new soft link to easy_install2.5:

$ sudo ln -s /usr/bin/easy_install-2.5 /usr/bin/easy_install

Install TurboGears 1.0.8

$ sudo easy_install TurboGears==1.0.8

Check whether TurboGears is properly installed or not…

$ tg-admin info

Make sure the following file does not exist:

$ sudo rm /usr/local/bin/easy_install

Install openerp-web:

$ sudo easy_install -U openerp-web

Adding openerp-web 5.0.1-0 to easy-install.pth file

Installing start-openerp-web script to /usr/bin

Installed /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg

Processing dependencies for openerp-web

Finished processing dependencies for openerp-web

Locate the config/default.cfg in the installed EGG, and make appropriate changes, especially:

$ cd /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg

$ sudo vi config/default.cfg

 # OpenERP SERVER

 [openerp]
 host = 'localhost' 
 port = '8070' 
 protocol = 'socket'

Replace:

[[[access_out]]]
  # set the filename as the first argument below
  args="('server.log',)"

With:

[[[access_out]]]
  # set the filename as the first argument below
  args="('/var/log/openerp-web.log',)"

!Be careful with the quotation marks in config files like the last one! if you copy and paste, be sure the text you copy from is preformatted or you might not be able to start openerp-web INIT script (/etc/init.d/openerp-web start). The previous three lines have been preformatted. Type the quotation marks if you encounter problems or you want to be sure.

Restart postgres and opener-server:

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

* Restarting PostgreSQL 8.3 database server [ OK ]

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

Restarting openerp-server: openerp-server.

Openerp-web run as service (non-root daemon)

$ sudo cp /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/scripts/openerp-web /etc/init.d/

$ sudo cp /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/config/default.cfg /etc/openerp-web.cfg

Alternate config file is now /etc/openerp-web.cfg. Somehow it is read by Ubuntu Server 9.0.4, but NOT by Ubuntu Desktop 9.0.4 (even though they both seem to have same config scripts and files). In case you’re setting this up on Ubuntu Desktop 9.0.4, just consider editing the default config file (/usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/config/default.cfg).

$ sudo chmod +x /etc/init.d/openerp-web

$ sudo vi /etc/init.d/openerp-web

# Specify the user name (Default: terp).
USER=openerp

Create /var/log/openerp-web.log with proper ownership

$ sudo touch /var/log/openerp-web.log

$ sudo chown openerp /var/log/openerp-web.log

Now run following command to start the OpenERP Web automatically on system startup (Debian/Ubuntu):

$ sudo update-rc.d openerp-web start 70 2 3 4 5 . stop 20 0 1 6 .

Starting the web server with start-openerp-web command

$ sudo -u openerp start-openerp-web

If everything is fine, open your favourite web browser and type http://localhost:8080 (or http://your_ubuntuserver_ip_adress:8080), and you can see welcome page with login screen.

Please make sure cookies are enabled in your browser.

HTTPS with Apache

$ sudo apt-get install apache2

$ sudo a2enmod ssl

$ sudo a2ensite default-ssl

$ sudo /etc/init.d/apache2 restart

Forcing Apache to redirect HTTP traffic to HTTPS

Choose a ServerName/URL for your OpenERP Web service, like openerpweb.com:

$ sudo vi /etc/apache2/sites-available/default

 <VirtualHost *:80>
 ServerAdmin webmaster@localhost
 ServerName openerpweb.com
 Redirect / https://openerpweb.com/
  ....
  ....
 </VirtualHost>

$ sudo a2enmod proxy

$ sudo a2enmod proxy_http

$ sudo a2enmod proxy_connect

$ sudo a2enmod proxy_ftp

Add your server’s IP address and URL in /etc/hosts:

$ sudo vi /etc/hosts

Replace

127.0.0.1 localhost
127.0.1.1 yourhostname

With

127.0.0.1 localhost
192.168.x.x openerpweb.com yourhostname

$ sudo vi /etc/apache2/sites-available/default-ssl

<VirtualHost *:443>
  ServerAdmin webmaster@localhost
  ServerName openerpweb.com
 <Proxy *>
  Order deny,allow
  Allow from all
 </Proxy>
  ProxyRequests Off
  ProxyPass        /   http://127.0.0.1:8080/
  ProxyPassReverse /   http://127.0.0.1:8080/
  ....
 </VirtualHost>

Restart Apache:

$ sudo /etc/init.d/apache2 restart

Check out your URL with a browser : http://openerpweb.com

Block OpenERP Web server port 8080 with a firewall

Do it locally as the first command will close all the existing ssh connections:

$ sudo ufw enable

$ sudo ufw allow ssh

$ sudo ufw allow http

$ sudo ufw allow https

Add the following lines:

Ubuntu Server 9.0.4:

$ sudo vi /etc/openerp-web.cfg

Ubuntu Desktop 9.0.4:

$ sudo vi /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/config/default.cfg

  base_url_filter.on = True
  base_url_filter.use_x_forwarded_host = False
  base_url_filter.base_url = "https://openerpweb.com"

!Be careful with the quotation marks in config files like the last one! if you copy and paste, be sure the text you copy from is preformatted or you might not be able to start openerp-web INIT script (/etc/init.d/openerp-web start). The previous three lines have been preformatted. Type the quotation marks if you encounter problems or you want to be sure.

Restart openerp-web:

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

Check out again your server’s URL http://openerpweb.com

Administrator: admin / openerp

Demo user: demo / demo

Restart the server with “sudo init 6” and make sure that all the openerp processes are started automatically as non-root

References & Demo Server

OpenERP Video guides can be found at http://www.openerp.tv

Demonstrations (Login: demo / Password: demo): http://openerp.com/en/discover/demonstration.html

Open Object is an open source Rapid Application Development framework in Python: http://openobject.com

Another demo server can be found at https://openerp.zikzakmedia.com , with the following users and passwords:

demobase/demobase
demoventas/demoventas
democompras/democompras
democonta/democonta

Open ERP Spain: http://www.openerpspain.com/

Open ERP Site (Spanish) http://www.openerpsite.com/

Open ERP modules for Spain (a must read): http://www.openerpsite.com/modulos-de-localizacion-espanola/322.html

How to download modules and latest versions from Launchpad (in Spanish) http://www.openerpsite.com/proyectos-openerp

Install extra modules: http://openerpwiki.citrusconsultants.com/wiki/index.php/Install_extra_modules

Global Module Index: http://doc.openerp.com/modindex.html

Another real budget (in Spanish, a must read): http://www.openerpsite.com/otro-presupuesto-real/416.html

Useful advices (in Spanish, a must read): http://www.openerpsite.com/consejos

This article published on How To Forge: http://howtoforge.org/installation-of-openerp-server-5.0-openerp-gtk-client-5.0-and-openerp-web-client-5.0.1-on-ubuntu-server-9.04

SHELL SCRIPT TO AUTOMATE THE INSTALLATION OF OPENERP-SERVER 5.0 WITH OPENERP-WEB 5.0.1 ON UBUNTU 9.0.4

A Shell script written by the author eases and automates the installation of openerp-server 5.0 with openerp-web 5.0.1 for Ubuntu 9.0.4: http://opensourceconsulting.wordpress.com/2009/06/29/openerp-server-5-0-openerp-web-5-0-1-installation-script-on-ubuntu-9-0-4-sh/

FAQ

1. start-openerp-web fails with the following error:

$ sudo -u openerp start-openerp-web

or

$ start-openerp-web
Traceback (most recent call last):
File “/usr/bin/start-openerp-web”, line 8, in <module>
load_entry_point(‘openerp-web==5.0.1-0’, ‘console_scripts’, ‘start-openerp-web’)()
File “/usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/openerp/commands.py”, line 58, in start
turbogears.update_config(configfile=configfile, modulename=”openerp.config”)
File “/usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/config.py”, line 207, in update_config
configdict = config_obj(configfile, modulename).dict()
File “/usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg/turbogears/config.py”, line 193, in config_obj
configdata2 = ConfigObj(configfile, unrepr=True)
File “build/bdist.linux-x86_64/egg/configobj.py”, line 1219, in __init__
File “build/bdist.linux-x86_64/egg/configobj.py”, line 1302, in _load
configobj.UnreprError: Parse error in value at line 27.

Workaround: This could happen once openerp-web has already been run for first time through the INIT script. As this means that the INIT script works, just launch openerp-web with “sudo /etc/init.d/openerp-web start”

2. start-openerp-web fails with the error: Can’t extract file(s) to egg cache

$ start-openerp-web

File “/usr/lib/python2.5/site-packages/pkg_resources.py”, line 887, in extraction_error
raise err
pkg_resources.ExtractionError: Can’t extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg cache:
[Errno 13] Permission denied: ‘/home/user/.python-eggs’
The Python egg cache directory is currently set to:
/home/user/.python-eggs
Perhaps your account does not have write access to this directory?  You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory.

Solution:

$ sudo -u openerp PYTHON_EGG_CACHE=/home/openerp/.python-eggs/ start-openerp-web

This article will show you how to set up openerp-server 5.0.0-3-1 + openerp-client 5.0.0-3-1 + openerp-web 5.0.1 for Ubuntu Server 9.0.4 and Ubuntu Desktop 9.0.4IntroductionOpen ERP (formerly named Tiny ERP) is the leader open-source ERP/CRM system written mostly in Python and initiated in Belgium. It offers a three-tier web architecture, ease of use and flexibility.With more than 1000 downloads per day, Open ERP is the most admired and the world’s fastest growing and used free open source management software solution in the world. Small and medium sized companies are now encouraged to use ERP.Open ERP is very modular, each adoption produces new modules. So they can be installed optionally or not, depending on the need of each enterprise. More than 350 modules of different kinds are available: accounting, finance, stock management, manufacturing, services management, customer relations, sales, project management, document management, internal organization, human resources, direct marketing, e-commerce, point of sale, payroll,… And about 10-20 modules are produced monthly!For Open Source software, experience has shown that there’s no need to train users for several months on the system, because they can just download it and use it directly. To make this process of learning fast and effective, Open ERP has taken several steps with its large partner network and community e.g. Forum and IRC which are platforms to discuss common topics among community and get help, Open ERP Planet is used to announce new developments in Open ERP, Launchpad is a unique collaboration and Bazaar code hosting platform for software projects. Other then these, detail Documentation is available which serve as a guide to understand and get started with Open ERP.

The latest version of OpenERP (5.0) was released in February 10th 2009. Canonical’s Ubuntu 9.0.4 is the first Linux distribution that provides this release. We will probably have to wait a few months until other distributions (Fedora 12, OpenSuSE 11.3, CentOS, etc) ease the latest updates of OpenERP 5.x. Nevertheless, all these major distributions already offer tinyerp-server and client release 4.2.3 (without including openerp-web).

Major troubles during the setting up

The most complicated part is with openerp-web 5.0.1 because of its dependency on TurboGears 1.0.8 . TurboGears 1.0.8 is not supported with the default Ubuntu 9.04 python version (python2.6)

OpenERP Web client 5.0.2 is still under development. This release is being migrated to CherryPy3 dropping the TurboGears framework as a major step to make the Web Client much more faster and easier to deploy. This will greatly reduce the pain of getting started with and deploying of OpenERP Web client. The number of third party dependencies will be reduced to 3-4 pure Python libraries. The initial test results offer almost 3-5 time speed improvement.

The default openerp-server and openerp-web INIT scripts cannot launch their corresponding services as non-root without fixing some technical issues. I will detail what configuration files and scripts have to be modified to avoid this.

Technical procedure. Initial installation and configuration

Upgrade of Ubuntu packages and installation of openerp and pgadmin:

$ sudo apt-get update

$ sudo apt-get upgrade

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

To avoid having some of the labels untranslated in the GTK client, install the language-pack-gnome-YOURLANG-base package. The following command installs the spanish language pack:

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

Postgres Database configuration:

$ sudo vim /etc/postgresql/8.3/main/pg_hba.conf

Replace the following line:

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

with:

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

Restart Postgres:

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

* Restarting PostgreSQL 8.3 database server [ OK ]

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

Quit from user postgres

$ exit

exit

Edit OpenERP configuration file:

$ sudo vi /etc/openerp-server.conf

Replace the following two lines (we don’t force to use a specific database and we add the required password to gain access to postgres):

db_name =

db_user = openerp

db_password = openerp

Troubles with Python releases: Python 2.6 is not yet supported by OpenERP 5.0, but it is the default Python release on Ubuntu 9.0.4. We need to launch OpenERP 5.0 with Python 2.5 or earlier. There’s also a problem with python-xml package in Ubuntu so we will reinstall it.

Python 2.5 setting up:

$ sudo apt-get install python2.5 python2.5-dev

Reinstall python-xml:

$ wget http://freefr.dl.sourceforge.net/sourceforge/pyxml/PyXML-0.8.4.tar.gz

$ tar xvzf PyXML-0.8.4.tar.gz

$ cd PyXML-0.8.4/

$ sudo python2.5 setup.py install

Make the following symbolic link:

$ sudo ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/

Force openerp-server to be launched with Python2.5:

$ cd /usr/bin/

$ sudo cp openerp-server openerp-server.ORIG

$ sudo vi openerp-server

Replace the following line:

exec /usr/bin/python ./openerp-server.py $@

with

exec /usr/bin/python2.5 ./openerp-server.py $@

We can now restart openerp-server:

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

Restarting openerp-server: openerp-server.

Check out the logs:

$ sudo cat /var/log/openerp.log

[2009-06-14 21:06:39,314] INFO:server:version – 5.0.0

[2009-06-14 21:06:39,314] INFO:server:addons_path – /usr/lib/openerp-server/addons

[2009-06-14 21:06:39,314] INFO:server:database hostname – localhost

[2009-06-14 21:06:39,315] INFO:server:database port – 5432

[2009-06-14 21:06:39,315] INFO:server:database user – openerp

[2009-06-14 21:06:39,315] INFO:objects:initialising distributed objects services

[2009-06-14 21:06:39,502] INFO:web-services:starting XML-RPC services, port 8069

[2009-06-14 21:06:39,502] INFO:web-services:starting NET-RPC service, port 8070

[2009-06-14 21:06:39,502] INFO:web-services:the server is running, waiting for connections…

OpenERP is now up and running, connected to Postgres database on port 5432 and listening on ports 8069 and 8070

$ ps uaxww | grep -i openerp

root   2276  0.0  2.3 185576 23708 ?        Sl   13:09   0:00 /usr/bin/python2.5 ./openerp-server.py –config=/etc/openerp-server.conf

$ sudo lsof -i :8069

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

python2.5 2276 openerp 3u IPv4 6515 TCP localhost:8069 (LISTEN)

$ sudo lsof -i :8070

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

python2.5 2276 openerp 5u IPv4 6520 TCP *:8070 (LISTEN)

Creation of a new database for OpenERP Server with OpenERP GTK Client

Launch openerp-client and create a new database for openerp-server:

$ openerp-client

File/Archivo -> Databases/Bases de Datos -> New Database/Nueva Base de Datos

Super-administrator password: “admin”
New database name: “openerp”
Administrator password: “openerp”
Confirm password: “openerp”

If the previous window gets frozen, just kill it and restart openerp-client in case you want to connect to the already created openerp database.

Fixing OpenERP Server INIT script bug

$ sudo vi /etc/openerp-server.conf

Comment out or remove the following line:

# The file where the server pid will be stored (default False).
#pidfile = /var/run/openerp.pid

Edit the init script:

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

Add the following line to the beginning of the init script:

USER=openerp

Setting up OpenERP Web client

The most complicated part is with openerp-web because TurboGears 1.0.8 is not supported with the default Ubuntu 9.04 python version (python2.6). Basically we want to avoid the following error:

$ sudo easy_install -U openerp-web
Running openerp-web-5.0.1-0/setup.py -q bdist_egg –dist-dir /tmp/easy_install-SJE_07/openerp-web-5.0.1-0/egg-dist-tmp-NFndZn
Error: python-xml >= 0.8.4 (PyXML, XML Tools for python) is required.
error: Setup script exited with 1

Then, to use easy_install for python2.5:

$ sudo apt-get install python2.5-setuptools

You must remove the default soft link to easy_install2.6

$ sudo rm /usr/bin/easy_install

Then create the new soft link to easy_install2.5:

$ sudo ln -s /usr/bin/easy_install-2.5 /usr/bin/easy_install

Install TurboGears 1.0.8

$ sudo easy_install TurboGears==1.0.8

Check whether TurboGears is properly installed or not…

$ tg-admin info

Make sure the following file does not exist:

$ sudo rm /usr/local/bin/easy_install

Install openerp-web:

$ sudo easy_install -U openerp-web

Adding openerp-web 5.0.1-0 to easy-install.pth file

Installing start-openerp-web script to /usr/bin

Installed /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg

Processing dependencies for openerp-web

Finished processing dependencies for openerp-web

Locate the config/default.cfg in the installed EGG, and make appropriate changes, especially:

$ cd /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg

$ sudo vi config/default.cfg

# OpenERP SERVER
[openerp]
host = ‘localhost’
port = ‘8070’
protocol = ‘socket’

Replace:

[[[access_out]]]
# set the filename as the first argument below
args=”(‘server.log’,)”

With:

[[[access_out]]]
# set the filename as the first argument below
args=”(‘/var/log/openerp-web.log’,)”

Restart postgres and opener-server:

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

* Restarting PostgreSQL 8.3 database server [ OK ]

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

Restarting openerp-server: openerp-server.

Openerp-web run as service (non-root daemon)

$ sudo cp /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/scripts/openerp-web /etc/init.d/

$ sudo cp /usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/config/default.cfg /etc/openerp-web.cfg

Alternate config file is now /etc/openerp-web.cfg. Somehow it is read by Ubuntu Server 9.0.4, but NOT by Ubuntu Desktop 9.0.4 (even though they both seem to have same config scripts and files). In case you’re setting this up on Ubuntu Desktop 9.0.4, just consider editing the default config file (/usr/lib/python2.5/site-packages/openerp_web-5.0.1_0-py2.5.egg/config/default.cfg).

$ sudo chmod +x /etc/init.d/openerp-web

$ sudo vi /etc/init.d/openerp-web

# Specify the user name (Default: terp).
USER=openerp

Create /var/log/openerp-web.log with proper ownership

$ sudo touch /var/log/openerp-web.log

$ sudo chown openerp /var/log/openerp-web.log

Now run following command to start the OpenERP Web automatically on system startup (Debian/Ubuntu):

$ sudo update-rc.d openerp-web start 70 2 3 4 5 . stop 20 0 1 6 .

Now start the web server with start-openerp-web command:

$ start-openerp-web

If everything is fine, open your favourite web browser and type http://localhost:8080 (or http://your_ubuntuserver_ip_adress:8080), and you can see welcome page with login screen.

Please make sure cookies are enabled in your browser.

Fixing openerp-web init script bug

$ sudo mkdir /home/openerp

$ sudo chown openerp.nogroup /home/openerp

HTTPS with Apache

$ sudo apt-get install apache2

$ sudo a2enmod ssl

$ sudo a2ensite default-ssl

$ sudo /etc/init.d/apache2 restart

Forcing Apache to redirect HTTP traffic to HTTPS

Choose a ServerName/URL for your OpenERP Web service, like openerpweb.com:

$ sudo vi /etc/apache2/sites-available/default

<VirtualHost *:80>
ServerName openerpweb.com
Redirect / https://openerpweb.com/
….
….
</VirtualHost>

$ sudo a2enmod proxy

$ sudo a2enmod proxy_http

$ sudo a2enmod proxy_connect

$ sudo a2enmod proxy_ftp

Add your server’s IP address and URL in /etc/hosts:

$ sudo vi /etc/hosts

Replace

127.0.0.1 localhost
127.0.0.1 yourhostname

With

127.0.0.1 localhost
192.168.x.x openerpweb.com yourhostname

$ sudo vi /etc/apache2/sites-available/default-ssl

<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName openerpweb.com
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
….
</VirtualHost>

Restart Apache:

$ sudo /etc/init.d/apache2 restart

Check out your URL with a browser : http://openerpweb.com

Block OpenERP Web server port 8080 with a firewall

Do it locally as the first command will close all the existing ssh connections:

$ sudo ufw enable

$ sudo ufw allow ssh

$ sudo ufw allow http

$ sudo ufw allow https

Add the following lines:

$ sudo vi /etc/openerp-web.cfg

base_url_filter.on = True
base_url_filter.use_x_forwarded_host = False
base_url_filter.base_url = “https://openerpweb.com&#8221;

Restart openerp-web:

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

Check out again your server’s URL http://openerpweb.com

Administrator: admin / openerp

Demo user: demo / demo

Restart the server with “sudo init 6” and make sure that all the openerp processes are started automatically as non-root

References & Demo Server

OpenERP Video guides can be found at http://www.openerp.tv

A demo server can be found at https://openerp.zikzakmedia.com , with the following users and passwords:

demobase/demobase
demoventas/demoventas
democompras/democompras
democonta/democonta

June 17, 2009 Posted by | ERP, Ubuntu Server Canonical | | 7 Comments

Here Comes the Bubble

A good sense of humour is necessary to overcome the pessimism of the current economic scenario. We all still remember how the dot-com bubble affected to our careers and lifes during the 2001-2003’s recession. Maybe we should remember that tough times will not last for good as soon or later new opportunities will arise again. Let’s take a deep breath and have fun with the following video:

April 22, 2009 Posted by | Entertainment, Video | 7 Comments

Follow

Get every new post delivered to your Inbox.

Join 32 other followers