Odoo (OpenERP) related Things

Odoo_8 & Odoo_9 database Management links..

Odoo_8
http://localhost:8089/web/database/manager

Odoo_9
http://localhost:8099/web/database/manager

nohup python odoo.py –config=odoo.conf &
nohup (Extra Container, nohup – run a command immune to hangups, with output to a non-tty)
python odoo.py (To run odoo from source)
–config=odoo.conf -(To input configuration file at start of odoo)
& (Running process in background)

Advertisements

Installation of openerp-7 from source and to run it parallel with other versions

Step 1. Install git, eclipse and bzr


sudo apt-get install git-core
sudo apt-get install eclipse
sudo apt-get install bzr

Step 2. Install dependencies needed, Postgres and Wkhtmltopdf


sudo apt-get install postgresql pgadmin3 bzr python-dateutil python-docutils python-feedparser python-gdata python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-xlrd python-scipy python-tk python-pmw python-cups eclipse openssh-server graphviz ghostscript \
python-dateutil python-feedparser python-matplotlib \
python-ldap python-libxslt1 python-lxml python-mako \
python-openid python-psycopg2 python-pybabel python-pychart \
python-pydot python-pyparsing python-reportlab python-simplejson \
python-tz python-vatnumber python-vobject python-webdav \
python-werkzeug python-xlwt python-yaml python-imaging \
gcc python-dev mc bzr python-setuptools python-babel \
python-feedparser python-reportlab-accel python-zsi python-openssl \
python-egenix-mxdatetime python-jinja2 python-unittest2 python-mock \
python-docutils lptools make python-psutil python-paramiko poppler-utils \
python-pdftools python-scipy python-decorator python-requests python-pypdf \
antiword postgresql postgresql-client build-essential libldap2-dev libsasl2-dev npm nodejs libxml2-dev libxslt1-dev libjpeg-dev python-pip gdebi python-passlib python-gevent python-psycogreen && sudo npm install -g less less-plugin-clean-css -y && sudo ln -s /usr/bin/nodejs /usr/bin/node && cd /tmp && wgethttp://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb && sudo gdebi -n wkhtmltox-0.12.2.1_linux-trusty-amd64.deb && sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin/ && sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin/

Step 3. download source from below link

https://nightly.odoo.com/

Step 4. download PyDev from below link

https://sourceforge.net/projects/pydev/files/pydev/PyDev%202.7.5/

Step 5. Unzip PyDev

unzip PyDev 2.7.5.zip

Step 6. Start Eclipse and Install PyDev with eclipse and configure it.

Open eclipse and go to  Help -> Install New Software -> Add
Click Local button and select the unzip PyDev folder, finally in Name field enter PyDev and click OK

To configure Python Interpreter go to Windows-> Preferences, select Interpreter Python, click Auto Config and finally click OK

Step 7. Start Eclipse and Install PyDev with eclipse


sudo su postgres
createuser openerpseven - dRSP (-d = Allowed to create databases, -R = Not be allowed to create new roles , -S = Not be a superuser, and -P = Prompt for the password of the new user)
Enter password on prompt

Step 8. Extract openerp-7 and move it to user’s home directory

cd /home/baharali/Download

unzip openerp_7.0.latest.zip
mv openerp-7.0-20161130/ ../

Step 9. Create openerp-7.0 configuration file

cd /home/baharali/openerp-7.0-20161130/

python openerp-server –save
mv ~/.openerp_serverrc ./openerpseven.conf

Step 10. Install Python and pytz


sudo apt-get install python-glade2 python-tz python-egenix-mxdatetime python-setuptools
sudo easy_install pytz

Step 12. Create New Python Project in Eclipse

File – > New – > PyDev Project
Enter Name for Project and then Uncheck Use Default option
Browse unzipped openerp-7.0-20161130 and select root directory and click Finish

Step 13. openerpseven.cong file Settings

Open openerpseven.config file in eclipse and do changes as;

db_user = openerpseven
longpolling_port = 8072
xmlrpc_port = 8079

Step 14. Run Project

Right click on openerp-server and run it as Python Run

Then go to Run -> Run Configuration and in Arguments enter (--config=openerpseven.conf)

Step 15. pg_hba.conf file setting for Peer Authentications.


vi /etc/postgresql/9.5/main/pg_hba.conf

Add below line
local   all             openerpseven                             trust
Restart postgresql using command

sudo service postgresql restart

Step 16. Add Server to Postgres pgAdmin


sudo su postgres
psql -d postgres
ALTER USER postgres with PASSWORD 'postgres';

Now go to pgAdmin
File -> Add Server (Name: Server, Host: localhost, Port: 5432, Maintenance DB: postgres, username: postgres, password: postgres) and click  OK

You are done

Thanks