vmware-marketplaceodoo

Upgrade Odoo

It is strongly recommended that you create a backup before starting the update process. If you have important data, it is advisable that you create and try to restore a backup to ensure that everything works properly.

WARNING: The process described in this section, only works in the same major version of Odoo (i.e. upgrading from Odoo11.x.y to Odoo11.x.z). If you want to upgrade between Odoo Major versions (i.e. upgrading from Odoo10.x to Odoo11.y) please check the Odoo Community Forum and this Odoo Community Association project.

  • Go to your Odoo installation and instead of logging in, click “Manage Databases”.

  • From this web interface, create a backup of the bitnami_odoo database.

  • Stop the running application.

  • Install a new version of Bitnami Odoo (or deploy a new server).

  • From the “Manage Databases” interface, restore the bitnami_odoo database.

  • Stop all servers except PostgreSQL and migrate your data as explained in the Migrate data to a new Odoo installation section.

Migrate data to a new Odoo installation

Once your Odoo installation has been updated, follow the steps below to migrate the data to a new installation.

  • Stop monit and other services:

      $ sudo monit quit
      $ sudo /opt/bitnami/ctlscript.sh stop
      $ sudo /opt/bitnami/ctlscript.sh start postgresql
    
  • Start the Odoo server with the following parameters:

      $ sudo su odoo -c "/opt/bitnami/odoo/bin/odoo -c /opt/bitnami/odoo/conf/odoo.conf --workers 0 -d bitnami_odoo -u all --stop-after-init &"
    
  • Wait until the server is completely started and the modules updated. Check the start-up status in the Odoo log file as shown below:

      $ sudo tail -f /opt/bitnami/odoo/log/odoo-server.log
    

    The upgrade process is finished when the messages “INFO bitnami_odoo odoo.service: Hit CTRL-C again or send a second signal to force the shutdown” or “Odoo waiting for connections” appear in the log file.

  • Start all the servers:

      $ sudo /opt/bitnami/ctlscript.sh start
    

IMPORTANT: When importing the data, you will also be importing the Odoo users, including the admin user and its password.

Upgrade only Odoo in the Bitnami Odoo Stack

This approach is not recommended because a new Odoo version may have new dependencies not included in your base stack.

  • Load the Virtualenv environment for Odoo as a superuser:

      $ sudo su
      $ . /opt/bitnami/odoo/venv/bin/activate
    
  • Download and install the latest Odoo version. For example:

      $ cd /tmp/
      $ wget http://nightly.odoo.com/X.Y/nightly/src/odoo_X.Y.latest.tar.gz
      $ tar zxvf odoo_X.Y.latest.tar.gz
      $ cd odoo-X.Y-VERSION
      $ pip install -r requirements.txt
      $ python3 setup.py install --install-scripts=/opt/bitnami/odoo/bin --install-lib=/opt/bitnami/odoo/lib
    
  • Update the paths in odoo.pth to match the new versions:

      $ find /opt/bitnami/odoo/lib -mindepth 1 -maxdepth 1 -type d | tee /opt/bitnami/odoo/venv/lib/python*/site-packages/odoo.pth
    
  • Disable the Virtualenv environment for Odoo:

      $ deactivate
    
Last modification February 9, 2023