Wednesday, January 28, 2015

Run OpenERP server and Upgrade custom modules/Addons through Command Line/Terminal

1) Change your directory to openerp.

For Example:

My openerp folder is placed in the home directory i.e. /home/ujwala/ ,

cd /home/ujwala/openerp

Normally, for running openerp server we only provide openerp-server command.

2) Now for Running the server and upgrading the custom addons in one go use the following command:

./openerp-server --addons-path=/home/ujwala/openerp/addons -u custom_module_name

here,
'--addons-path' is nothing but the total path till addons i.e. /home/ujwala/openerp/addons/,

'-u custom_module_name' used to upgrade the specified custom module

3) Also to upgrade a custom module for a specific database, use the following command:

./openerp-server –addons-path=/home/ujwala/openerp/addons -u custom_module_name -d dbname

'-d dbname' used for upgrading the module for a given database name.

Thats it.

Normally, for upgrading the modules through browser we usually go to settings-->Installed Modules then delete the “Installed” filter in the search box, search for the module and then upgrade it. Which is usually the longest process.

Whereas above commands will save your time and you can upgrade the modules by hitting a single command.

Note: For upgrading more than one custom addons/modules provide module names being comma separated i.e. -u custom_module1,custom_module2
(Dont give a space after comma.)

No comments:

Post a Comment