Jul 7, 2016

could not execute command 'lessc' odoo 9.0

Well ... odoo installed properly and running well on local server. However after creating a data base and successfully logging in, the odoo appearance got weird error message informed could not execute command 'lessc' spending couple hours for googling and various suggestion did not work properly

Understanding the error
is the clue whats the error, odoo depending very much one node-less ubuntu and red-hat have package named node-less but gentoo dont't have it. When installing nodejs we have nmp package merged bu USE flag. Use this to install less package
# npm install -g less
# ls /usr/bin
lessc -> ../lib64/node_modules/less/bin/lessc
Restart odoo-server and check with your web ... the error msg will be gone
That's it

Jul 6, 2016

Odoo 9.0 on Gentoo 13.0 OpenRC

OKAY .... systemD is very popular init system, which will be the star of almost all linux distro in the future. I have been long time user of OpenRC and familiar with this. At least for my personal computer a T430 Lenovo Laptop and H3050-Lenovo Desktop. I stay in OpenRC running Gentoo Linux. Odoo (Open ERP) gaining high popularity lately and millions users NEED this kind of suite . I believed odoo will be must have application for most office and business at any size. Searching in the internet ... pages of tutorial how to install odoo community version which is Free of Charge, the source reside on git repository
The following tutorial I used for reference in installing odoo on my local computer for learning and developing purpose. The only different is The Linux Distro. Most tutorial for installing odoo 9 on ubuntu (14.04) and some pages for CenTOS. Need working hard to find the tutorial for Gentoo.
  1. Openies Odoo 9 Installation Tutorial
  2. Odoo 9 install turorial by Linode
  3. Official Odoo 9.0 Documentation
Art of Choice
As mentioned on the odoo documentation, there are many options to install Odoo 9
  1. Using Installer Scripts by ANDRE SCHENKELS which is NOOB PROOF
  2. For someone who will learn to familiarize with odoo 9, using Andre's scripts will be best choice. Andre's brilliantly automate odoo 9.0 installation with a single scripts works flawlessly on ubuntu 14.04 which is also using OpenRC. The page clearly mentioned for ubuntu 14.04 and similar deb base distro under OpenRC. User can modified if wanna to install other version i.e odoo v8.
  3. Installing by ubuntu (debian base distro) and rpm base distro via their respective repository
  4. This option will also NOOB PROOF and safe time. But I personally did not check if the repository provide other odoo version other than 9.0.
  5. Manual Install
  6. Bit effort, with some confusion and need to read some tutorial, the page by Openied and Linode are recommended. Installing on similar distro just follow as is
Odoo 9.0 on Gentoo system
  1. Gentoo system (mine is multilib) since I need this machine to get rid with CyanogenMod 13.0 rom
  2. Apache web server (dunno this is mandatory or NOT, I have it since I need to set virtual host also)
  3. Goodwill, time, energy, internet connection
Creating a system user with $name odoo home directory /opt you can choose any path I choose /opt due to in my system /opt have own partition
My system
genT430 [/store] ###
[root] 05:08 PM Wed Jul 06 ># df -H
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 30G 6.7G 22G 24% /
devtmpfs 11M 0 11M 0% /dev
tmpfs 1.7G 857k 1.7G 1% /run
shm 8.4G 546M 7.8G 7% /dev/shm
cgroup_root 11M 0 11M 0% /sys/fs/cgroup
/dev/sda2 30G 2.8G 26G 10% /opt
/dev/sda1 62M 3.9M 59M 7% /boot/efi
/dev/sda4 99G 21G 73G 23% /droid
/dev/sda6 59G 7.2G 49G 13% /home
/dev/sda5 98G 33G 60G 36% /store
tmp 8.4G 873k 8.4G 1% /tmp
vartmp 8.4G 29k 8.4G 1% /var/tmp
none 8.4G 13k 8.4G 1% /run/user/1000
# useradd -r -m -U -b /opt/ -s /bin/bash odoo
merge postgresql on stable system portage provided postgresql-9.5 which is well accepted by Odoo 9.0
emerge --ask dev-db/postgresql look into default USE flad enabled : Odoo required ldap ssl enabled, if no ... edit your USE flag. Postgresql will running, set and work out of the box, nothing special configurations needed.
postgresql having default admin user postgres we need to log in as postgresql admin to create a user database with access to create and drop databse on odoo system.
command # su - postgres
ensure that you have log in as postgresql user named postgres, see below the user changed from root to postgres
genT430 [/store] ###
[root] 05:45 PM Wed Jul 06 ># su - postgres
genT430 [~] ###
[postgres] 05:45 PM Wed Jul 06 >#
as postgres admin user execute command
# createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
Enter password for new role: ********
Enter it again: ********
# exit
NOTE : remember this password, it will be very useful for further configuration
Get required libraries (if you don't have it already)
emerge -DNuvp dev-python/pip libevent libxml2 libxslt nodejs sasl wkhtmltopdf git look : if all USE flag have been satisfied just merge accordingly
Once all libraries satisfied, execute this command
#cd /tmp && wget https://raw.githubusercontent.com/odoo/odoo/9.0/requirements.txt && pip install -r requirements.txt downloading some libraries required by odoo 9 as mentioned on file requirements.txt
... just wait and ensure no any error
Log in as odoo user and grab odoo 9.0 system on git hub
#su - odoo -s /bin/bash
in my case the root user changed to odoo user in the odoo home directory, see below
genT430 [/store] ###
[root] 06:08 PM Wed Jul 06 ># su - odoo -s /bin/bash
genT430 [~] ###
[odoo] 06:08 PM Wed Jul 06 >#
as odoo user grab the system by cloning from github
#git clone https://www.github.com/odoo/odoo --depth 1 --branch 9.0 --single-branch .
don't miss the DOT after word --single-branch[space]DOT if you were do copy and paste
It will take a while depending on your speed of internet connection ... just relax, get coffee
Configuring Odoo System
Note by default, path of odoo server configuration is in /opt/odoo/debian/openerp-server.conf
We need to copy the file and changed ownership and permission for only odoo user
# mkdir /etc/odoo
# cp /opt/odoo/debian/openerp-server.conf /etc/odoo/odoo-server.conf
# chown odoo: /etc/odoo/odoo-server.conf
# chmod 640 /etc/odoo/odoo-server.conf
We set the configurations is writable by odoo user and readable by odoo and root users
Modify file /etc/odoo/odoo-server.conf
Pay attention at addons_path=... by default addons_path = /usr/lib/python2.7/dist-packages/openerp/addons
modified to
Thus if we will add any modules to main system, just put the module in addons directory to make main system clean and free from polltant for easy update
Installing init scripts
This script for easy start and stop odoo-server and set to automatic starting where neccessary, since the scripts is for debian, need minor modifications for Gentoo. Note : I modified script from Openies India thus credit for them DOWNLOAD INIT SCRIPT FOR GENTOO HERE safe anywhere in your /home/user/directory
Extract the file and put in the directory /etc/init.d/ thus you wil have file /etc/init.d/odoo-server
execute command to change the permission and ownership
# chmod 755 /etc/init.d/odoo-server
# chown root: /etc/init.d/odoo-server
Just share this is only different from debian script, due to distro dependant
#. /lib/lsb/init-functions (debian/ubuntu)
. /etc/profile (gentoo)
. /etc/init.d/functions.sh (gentoo)
function _stop() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo
rm -f $PIDFILE
openies script..>
function _stop() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo --retry3
rm -f $PIDFILE
N=/etc/init.d/$NAME (openies)
N=/etc/init.d/$DESC (Gentoo)
Make log file for odoo
# mkdir /var/log/odoo
# cd /var/log/odoo
# cat > odoo-server.log
# ctrl+c
Modified file odoo-server.log file
# chmod 755 /var/log/odoo/odoo-server.log
# chown odoo:root -R /var/log/odoo/odoo-server.log
execute command >
# /etc/init.d/postgresql-9.5 start ..... (to start postgresql server)
# /etc/init.d/odoo-server start .... (to start odoo-server)
To ensure odoo system run as expected... check by command >
# tail -f /var/log/odoo/odoo-server.log
If look everything good .... just open your browser and navigate to
Your browser will prompted with :

If No.... then there is something wrong with the installation
Small Trouble shouting
Server Not Running at all according to browser
Pay attention to file /etc/odoo/odoo-server.conf
; This is the password that allows database operations:
; admin_passwd = admin <---
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /opt/odoo/addons
xmlrpc_port = 8069
odoo by default using port 8069 puting xmlrpc_port = 8069 just to ensure odoo using this port
Firefox Browser
Firefox (AFAIK) have feature to always add prefix www or suffix DOTcom sometime this will prevent you to access localhost..... Disabled this feature from about:config or DOWNLOAD VIVALDI BROWSER
odoo server installation
Sometimes we are in doubt and have no clue, whats wrong with all failure of odoo running, the odoo itself, configurations or init-scripts. The best way to test is : change to odoo user ( su - odoo -s /bin/bash) navigate to odoo directory /opt/odoo and execute command >
[odoo]/opt/odoo # ./odoo.py Odoo server should running on ... you can access from browser
Automate Odoo server start
# rc-update add postgresql-9.5 default
... adding postgresql to runlevel default...
# rc-update add odoo-server default
... adding odoo server to runlevel default...
# rc-update add apache2 default
... adding apache to runlevel default
Have nice odooing ..

Jul 3, 2016

Hello Plasma KDE 5.5.5

Have been long time jailed into Gnome world. Decided to grab Kde-Plasma on the nice lappie Lenovo T430, not really powerful but 1600 x 900 screen on 14" display look good. Need to learn and read pages on internet to understand the Plasma. Be sure, it is worth spending Ramadhlan holiday by build great desktop system on Gentoo. I have tried, ubuntu gnome 14.04, Eelementary OS 0.2, ArchLinux and finally falling back to Gentoo I faced struggle on dealing with system D considering the system will powering a piece of laptop, switched back to stable OpenRC save a lot of time and energy.
  1. Mysterious local hostname
  2. dhcppc2 mysterious hostname suspected coming from bugs of NetworkManager, turn to WICD, the hazzle gone. But I faced another problem, connection to home wifi router regularly disconnected, every 15 - 20 minuted. I have to recompile several time and reconfigured WICD, no lucks, problem persist. Unmerged WICD back to relly on wpa_supplicant and finally decided to build wpa_supplicant with GUI enabled, thus USE flags, qt5 must be disabled and enable qt4 WPA Gui running smoothly and almost no single problem. I don't think I will connect to wired network with this lappie, thus WPA GUI is suffice. Alternatively I used DHCPCD-UI built with qt4, but this piece of GUI must run as root to work properly in my system. Then I stick with WPA_gui.

  3. SDDM, LightDM but No KDM
  4. By default on Gentoo e-builds, kde-plasma/plasma-meta grab sddm as display manager, with USE flags : consolekit enabled as well as XDM. From some reading, the best way to start a Desktop Environment is the DE itself. In several occasions, Plasma DE did not start after log in, screen just blank and nothing can do, thus I need to log in to terminal either rebooting the machine or start DE manually. It is not the way GUI should working.
    by disabled USE Flag : -sddm portage will grab lightDM, nothing wrong with lightDM, but I believed to developer team, by choosing SDDM, they must have good reason. Thus I will stick with SDDM. The solution is to disable consolekit USE flag in merging SDDM and XDM and back to old fashion using startkde ini .xinitrc file .... LOL
    I did not read release Note, but do not know the reason they dropped KDM on kde-plasma, KDM is heavy but cool.
Overall KDE Plasma is great DE ... I think better than Gnome 3 ....

could not execute command 'lessc' odoo 9.0

Well ... odoo installed properly and running well on local server. However after creating a data base and successfully logging in, the odoo...