Upgrade OpenERP 8 to Odoo 9 using OpenUpgrade
OpenUpgrade migrates the database of an Odoo installation to the next version. This guide covers upgrading from Odoo 8 to 9 on a basic installation without third-party modules.
From the archive. This guide applies to the software and hardware versions it describes.
This guide starts from an up-to-date Linux installation. I used Ubuntu 18.04.
Check the modules
Check whether any custom modules or modules missing from the list need changes.
Prepare for the upgrade
$ systemctl stop odoo
The following packages are required for the migration or for Odoo 8.0 later on:
$ apt install node-less node-clean-css
Upgrade Odoo 8.0 to 9.0
$ systemctl stop odoo
$ su - odoo
wget raw.githubusercontent.com/OCA/OpenUpgrade/9.0/scripts/migrate.py
python migrate.py --config=/etc/odoo/odoo-server.conf --database=dbname_8 --run-migrations=9.0
less /var/tmp/openupgrade/migration.log
Adjust the user, the configuration file path and the database name for your installation.
Finally, check the migration log for errors:
less /var/tmp/openupgrade/migration.log
Install Odoo 9.0
$ cd /opt/odoo
# git clone github.com/odoo/odoo.git --branch 9.0 --single-branch --depth 1
$ mkdir -p /opt/odoo-custom/9.0/addons
$ chown -R odoo:odoo /opt/odoo/
$ chown -R odoo:odoo /opt/odoo-custom/
$ vim /etc/odoo/odoo-server.conf
[options]
addons_path = /opt/odoo/9.0/addons,/opt/odoo-custom/9.0/addons
admin_passwd = SomeStr0ngPaßword
db_host = False
db_port = False
db_user = odoo
db_password = False
;Log settings
logfile = /var/log/odoo/odoo-server.log
log_level = error
Next, update the Odoo service:
$ vim /etc/systemd/system/odoo.service
[Unit]
Description=Advanced OpenSource ERP and CRM server
Requires=postgresql.service
After=postgresql.service
[Install]
Alias=odoo.service
[Service]
Type=simple
PermissionsStartOnly=true
EnvironmentFile=-/etc/conf.d/odoo-server
User=odoo
Group=odoo
SyslogIdentifier=odoo-server
PIDFile=/run/odoo/odoo-server.pid
ExecStartPre=/usr/bin/install -d -m755 -o odoo -g odoo /run/odoo
ExecStart=/opt/odoo/9.0/openerp-server -c /etc/odoo/odoo-server.conf --pid=/run/odoo/odoo-server.pid --syslog $ODOO_ARGS
ExecStop=/bin/kill $MAINPID
[Install]
WantedBy=multi-user.target
Rename the database
$ su - odoo -c "psql"
ALTER DATABASE dbname_migrated RENAME TO dbname_9;
\l
\q
Start Odoo
$ systemctl start odoo
Open Odoo at http://example.com:8069 and check the installation. Before putting the new version into production, verify that all data was migrated correctly and that your workflows work as intended.