Wednesday, February 18, 2015

Run OpenERP server on any port (than port 8069) and Upgrade OpenERP custom modules/Addons using external script.


Note: By default, OpenERP runs on 8069 port.

It is suggested that while developing your custom OpenERP addons, it is a good practice to keep custom addons in a different directory (let say 'addons_custom' -->you can give any name to this directory) than to keep it in the OpenERP main addons without disturbing their main functionality.


Following snapshot shows the steps to Run OpenERP server on any port (than 8069 port) and Upgrade OpenERP custom modules/Addons.










Explanation:
Create a bash file i.e. Executebale file. e.g. test.sh
1) #!/bin/bash
--> Executes the file using sh, the Bourne shell, or a compatible shell
2) path='home/ujwala/openerp/'
--> Provide openerp path in any variable, here variable used is 'path'
Here openerp is placed in /home/ujwala directory so path is '/home/ujwala/openerp/'
3) openerp_path=$path'openerp/'
--> Provide openerp internal folder path using another variable let say 'openerp_path'
which will be a path till openerp (i.e. path='home/ujwala/openerp/') and then internal openerp folder so 'openerp_path' variable will contain $path'openerp/'
4) addons_path=$openerp_path'addons',$openerp_path'addons_custom'
In openerp 'addons' are in the internal openerp folder or else you can create 'addons_custom' folder in the internal openerp folder.
5) port=6100
-->Provide any port number, here I have used 6100 port.
Note: its not mandatory to provide a port in the script. If you don't give port no then default port 8069 will be used.
6) cd $path --> It will change the directory to given path.
7) ./openerp-server --addons-path $addons_path --xmlrpc-port $port -u hr_customs
--> this command will run the openerp server with upgradation of given custom addons at given port number.

Save this file and run it through terminal using 'sh test.sh' command.

No comments:

Post a Comment