by Igor | May 25, 2015 | Linux
Sed replace path with slash separators by using a different separator char.
If you have an environment variable that contains a slash like a path, let say
addons_path = /home/netjunky/projects/odoo-dev/odoo/openerp/addons
and you want to replace “addons_path = /home/netjunky/projects/odoo-dev/odoo/openerp/addons” with “addons_path = /home/netjunky/projects/odoo-dev/odoo/custom/addons” using sed, usually you would try something like this
sudo sed -i ‘s/addons_path = */addons_path = /home/netjunky/projects/odoo-dev/odoo/custom/addons/’ /home/netjunky/projects/odoo-dev/odoo/config/openerp-server.conf
this raise an error like
sed: -i expression #1, char 9: unknown option to `s’
but if you try
sudo sed -i ‘s|addons_path = *|addons_path = /home/netjunky/projects/odoo-dev/odoo/custom/addons,|’ /home/netjunky/projects/odoo-dev/odoo/config/openerp-server.conf
It works!!!
You can use any other separator instead of |.
by Igor | May 18, 2015 | Odoo
Change Odoo decimal precision configuration in few easy steps.
1.) Make sure your techincal features are turned on (Go to Settings/Users/admin)
2.) Change accounting settings (Go to Settings/Configuration/Accounting)
Change Decimal precision on journal entries to 4.
Change Rounding factor to 0.000100 in your Default Company Currency Setting (Go to Settings/Configuration/Accounting/Default company currency).
3.) Change Decimal Accuracy setting (Go to Settings/Database Structure/Decimal Accuracy)
Change value of Product Price and Account to 4.
And the final result is Quote or Sales Order with 4 digits.
by Igor | May 17, 2015 | Linux, Odoo
Setup your ubuntu server and run Odoo on port 80 instead of 8069
1.) Connect with ssh client to your Ubuntu server
2.) Use your favorite text editor (vim, nano…) to edit /etc/rc.local file
sudo nano /etc/rc.local
3.) Paste this into /etc/rc.local file
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8069
4.) Reboot your Ubuntu server to see effect
sudo reboot
5.) Access Odoo on port 80
That’s all folks!
by Igor | May 15, 2015 | Hosting
A little reminder of how to delete emails from Exim queue if cPanel queue manager does not work.
cd /var/spool/exim
find input -type f -exec rm -rf {} \;
find msglog -type f -exec rm -rf {} \;
service exim restart
by Igor | May 15, 2015 | Hosting
A little reminder of how to empty cPanel catchall email account.
$ cd /home/username/mail
$ rm -rf cur
$ rm -rf new
$mkdir cur
$mkdir new
Recent Comments