Tuesday, September 19, 2017

install odoo 10 on ubuntu 16.04

Step 1. Log as root user and update system

Open Terminal Window
2.      Enter below command for root access, and after entering it ask for root password.
sudo /bin/bash
[sudo] password for user : (Enter your root password)
3.      Now make sure your server has all the latest versions & patches by     doing an update:
sudo apt-get update
           
Now we’re ready to start the Odoo install.

Step 2. Create the Odoo user that will own and run the application

  1.        Create odoo user and installation directory by below command
sudo adduser --system --home=/opt/odoo --group odoo
/opt/odoo, this is where the OpenERP server code will reside and is created automatically by the command above
      Now we check odoo user by below command
     sudo su - odoo -s /bin/bash
When you have done what you need you can leave the odoo user’s shell by typing below command and back to root shell.
Exit

Step 3. Install and configure the database server, PostgreSQL

  •          Install Postgresql by below command
 sudo apt-get install postgresql  
  •        For configure the Odoo user on postgres, We require postgres shell by below command
        sudo su - postgres
  •      Now create a new database user. This is so Odoo has access rights to connect to PostgreSQL and to create and drop databases.
[Remember what your choice of password is here; you will need it later on]

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
Enter password for new role: ********
Enter it again: ********
  • Finally exit from the postgres user account by below command and return to root shell.
Exit

Step 4. Install the necessary Python libraries for the server

1. Give below command one by one to install python libraries

sudo apt-get install python-cups python-dateutil python-decorator python-docutils python-feedparser

sudo apt-get install python-gdata python-geoip python-gevent python-imaging python-jinja2 python-ldap python-libxslt1

sudo apt-get install python-lxml python-mako python-mock python-openid python-passlib python-psutil python-psycopg2

sudo apt-get install python-pybabel python-pychart python-pydot python-pyparsing python-pypdf python-reportlab python-requests

sudo apt-get install python-simplejson python-tz python-unicodecsv python-unittest2 python-vatnumber python-vobject

sudo apt-get install python-werkzeug python-xlwt python-yaml wkhtmltopdf

Step 5. Install the Odoo server from git

1. First we require to install Git by below command

sudo apt-get install git

2. Now For clone odoo from git we require Odoo shell access so we switch to odoo user by below command.

sudo su - odoo -s /bin/bash

3.      Now Grab a copy of the most current Odoo 8 branch

[Note the “.” at the end of this command!]

git clone https://www.github.com/odoo/odoo --depth 1 --branch 10.0 --single-branch .

           (This might take a little while depending on the speed of your Internet connection.)
                             
4.      Once it’s finished exit from the odoo user by below command and return to root shell.
 Exit

Step 6. Configure the Openerp application.

  •      The default configuration file for the server (/opt/odoo/debian/openerp-server.conf) is actually very minimal and will, with only a small change work fine so we’ll copy that file to where we need it and change its ownership and permissions:
sudo cp /opt/odoo/debian/openerp-server.conf /etc/odoo-server.conf
sudo chown odoo: /etc/odoo-server.conf
sudo chmod 640 /etc/odoo-server.conf
The above commands make the file owned and writeable only by the odoo user and group and only readable by odoo and root.
  •      To allow the odoo server to run initially, you should only need to change two lines in this file. Toward to the top of the file change the line
(For Edit configuration File use sudo nano /etc/odoo-server.conf)
db_password = False (Replace False with the same password you used back in step 3)
addons_path = /usr/lib/python2.7/dist-packages/openerp/addons replace this with addons_path = /opt/odoo/addons instead.

One other line we have to add in the configuration file at last.
logfile = /var/log/odoo/odoo-server.log
(Save Configuration File by Ctrl + X and it ask for save then Press Y and Enter)
  •      Now we can start odoo server using odoo user
Change root shell to odoo shell by below command
sudo su - odoo -s /bin/bash
start odoo server
/opt/odoo/openerp-server

If you end up with a few lines eventually saying OpenERP then you are all set.
If there are errors, you’ll need to go back and find out where the problem is.
  •      Now enter CTL+C to stop the server and then exit

Step 7. Installing the boot script

1.      Now get script file from here and put it in /etc/init.d/ folder.

2.      Change permission and ownership of script file by below command.
sudo chmod 755 /etc/init.d/odoo-server
sudo chown root: /etc/init.d/odoo-server

3.      In the configuration file there’s an entry for the server’s log file. We need to create that directory first so that the server has somewhere to log to and also we must make it writeable by the openerp user:

sudo mkdir /var/log/odoo
sudo chown odoo:root /var/log/odoo

Step 8. Testing Odoo Server

1.      To start the Odoo server type:
sudo /etc/init.d/odoo-server start
or
service odoo-server start

2.      We can check odoo server log by below command
tail /var/log/odoo/odoo-server.log

install odoo 9 on ubuntu 16.04

Step 1. Log as root user and update system

Open Terminal Window
2.      Enter below command for root access, and after entering it ask for root password.
sudo /bin/bash
[sudo] password for user : (Enter your root password)
3.      Now make sure your server has all the latest versions & patches by     doing an update:
sudo apt-get update
           
Now we’re ready to start the Odoo install.

Step 2. Create the Odoo user that will own and run the application

  1.        Create odoo user and installation directory by below command
sudo adduser --system --home=/opt/odoo --group odoo
/opt/odoo, this is where the OpenERP server code will reside and is created automatically by the command above
      Now we check odoo user by below command
     sudo su - odoo -s /bin/bash
When you have done what you need you can leave the odoo user’s shell by typing below command and back to root shell.
Exit

Step 3. Install and configure the database server, PostgreSQL

  •          Install Postgresql by below command
 sudo apt-get install postgresql  
  •        For configure the Odoo user on postgres, We require postgres shell by below command
        sudo su - postgres
  •      Now create a new database user. This is so Odoo has access rights to connect to PostgreSQL and to create and drop databases.
[Remember what your choice of password is here; you will need it later on]

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
Enter password for new role: ********
Enter it again: ********
  • Finally exit from the postgres user account by below command and return to root shell.
Exit

Step 4. Install the necessary Python libraries for the server

1. Give below command one by one to install python libraries

sudo apt-get install python-cups python-dateutil python-decorator python-docutils python-feedparser

sudo apt-get install python-gdata python-geoip python-gevent python-imaging python-jinja2 python-ldap python-libxslt1

sudo apt-get install python-lxml python-mako python-mock python-openid python-passlib python-psutil python-psycopg2

sudo apt-get install python-pybabel python-pychart python-pydot python-pyparsing python-pypdf python-reportlab python-requests

sudo apt-get install python-simplejson python-tz python-unicodecsv python-unittest2 python-vatnumber python-vobject

sudo apt-get install python-werkzeug python-xlwt python-yaml wkhtmltopdf

Step 5. Install the Odoo server from git

1. First we require to install Git by below command

sudo apt-get install git

2. Now For clone odoo from git we require Odoo shell access so we switch to odoo user by below command.

sudo su - odoo -s /bin/bash

3.      Now Grab a copy of the most current Odoo 8 branch

[Note the “.” at the end of this command!]

git clone https://www.github.com/odoo/odoo --depth 1 --branch 9.0 --single-branch .

           (This might take a little while depending on the speed of your Internet connection.)
                             
4.      Once it’s finished exit from the odoo user by below command and return to root shell.
 Exit

Step 6. Configure the Openerp application.

  •      The default configuration file for the server (/opt/odoo/debian/openerp-server.conf) is actually very minimal and will, with only a small change work fine so we’ll copy that file to where we need it and change its ownership and permissions:
sudo cp /opt/odoo/debian/openerp-server.conf /etc/odoo-server.conf
sudo chown odoo: /etc/odoo-server.conf
sudo chmod 640 /etc/odoo-server.conf
The above commands make the file owned and writeable only by the odoo user and group and only readable by odoo and root.
  •      To allow the odoo server to run initially, you should only need to change two lines in this file. Toward to the top of the file change the line
(For Edit configuration File use sudo nano /etc/odoo-server.conf)
db_password = False (Replace False with the same password you used back in step 3)
addons_path = /usr/lib/python2.7/dist-packages/openerp/addons replace this with addons_path = /opt/odoo/addons instead.

One other line we have to add in the configuration file at last.
logfile = /var/log/odoo/odoo-server.log
(Save Configuration File by Ctrl + X and it ask for save then Press Y and Enter)
  •      Now we can start odoo server using odoo user
Change root shell to odoo shell by below command
sudo su - odoo -s /bin/bash
start odoo server
/opt/odoo/openerp-server

If you end up with a few lines eventually saying OpenERP then you are all set.
If there are errors, you’ll need to go back and find out where the problem is.
  •      Now enter CTL+C to stop the server and then exit

Step 7. Installing the boot script

1.      Now get script file from here and put it in /etc/init.d/ folder.

2.      Change permission and ownership of script file by below command.
sudo chmod 755 /etc/init.d/odoo-server
sudo chown root: /etc/init.d/odoo-server

3.      In the configuration file there’s an entry for the server’s log file. We need to create that directory first so that the server has somewhere to log to and also we must make it writeable by the openerp user:

sudo mkdir /var/log/odoo
sudo chown odoo:root /var/log/odoo

Step 8. Testing Odoo Server

1.      To start the Odoo server type:
sudo /etc/init.d/odoo-server start
or
service odoo-server start

2.      We can check odoo server log by below command
tail /var/log/odoo/odoo-server.log

Install Apache In Ubuntu

Step 1: Install Apache and Allow in Firewall

For our purposes, we can get started by typing these commands:

sudo apt-get update
sudo apt-get install apache2

Step 2: Set Global ServerName to Suppress Syntax Warnings

Next, we will add a single line to the /etc/apache2/apache2.conf file to suppress a warning message. While harmless, if you do not set ServerName globally, you will receive the following warning when checking your Apache configuration for syntax errors:

sudo apache2ctl configtest
Output
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, 
using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message 
Syntax OK
 
Open up the main configuration file with your text edit:

sudo nano /etc/apache2/apache2.conf
 
Add below line or Find ServerName and uncomment it 
ServerName server_domain_or_IP
 
Save and close the file when you are finished.
Next, check for syntax errors by typing:

sudo apache2ctl configtest
Output
Syntax OK

Saturday, June 10, 2017

Barcode Not Print Qweb PDF Odoo

For Print Barcode require reportlab fonts to be installed in python package.
Below steps to install Reportlab Fonts with python.

1. Download ZIP and extract http://www.reportlab.com/ftp/pfbfer.zip
2. Create folder named "fonts" in " /usr/lib/python2.7/dist-packages/reportlab/"
3. Copy content of folder extracted in "fonts" folder
4. Restart Odoo server

Lessc Error In Odoo9/Odoo10

Odoo 9 and Odoo 10 require Less Css to be intstalled. Here are steps to install Less.

1. sudo npm install -g less less-plugin-clean-css
Above command require npm install in system. You can install it by apt-get install npm

2. sudo apt install nodejs-legacy

3. sudo ln -s /usr/local/bin/lessc /usr/bin/lessc

4. sudo apt-mark hold node-less

Restart Odoo Service and Its Done.