Odoo Installing / Upgrading Module using CLI: Installing or Upgrading Odoo modules via Odoo CLI for faster deployment and streamlined module management without accessing the user interface.

This article will tell you the various commands that you can perform for installation or upgradation of modules using Odoo CLI.
If you don’t have basic knowledge of Odoo CLI, please read beginner guide to Odoo CLI.
Installing the module using Odoo CLI:
./odoo-bin -c config_file.conf -d dbname -i module_name --stop-after-init --logfile=/

Upgrading the module using Odoo CLI:
./odoo-bin -c config_file.conf -d dbname -u module_name --stop-after-init --logfile=/

Here,
./odoo-bin: This command part specifies the path to the Odoo binary executable (odoo-bin). The ./ at the beginning indicates that the executable is in the current directory
-c /config_file.conf: Here, the -c flag is used to specify the configuration file for Odoo. For instance, my configuration file is located at /etc/odoo.conf
dbname: specify the database name
-i: for installing the module
-u: for upgrading the module
module_name: provide one or more module names (comma-separated list, use “all” for all modules)
–stop-after-init: stop the server after its initialization
–logfile=/: file where the server log will be stored, in my case it is overwritting the logfile from config and shows on the same window
Few more flags as,
-s: save configuration to ~/.odoorc (or to ~/.openerp_serverrc if it exists)
–without-demo=WITHOUT_DEMO: disable loading demo data for modules to be installed (comma separated, use “all” for all modules). However, it requires -d and -i
–addons-path=ADDONS_PATH: specify additional addons paths (separated by commas)
–db-filter=REGEXP: Regular expressions for filtering available databases for Web UI. In other words, the expression can use %d (domain) and %h (host) placeholders
–test-file=TEST_FILE: Launch a python test file
Hope this will help to understand the installation and upgradation of the odoo module using CLI.
Be the first to comment.