Migration Odoo 15CE vers 17EE

Préparation

# MAJ du systeme apt update apt dist-upgrade # Installation des paquets nécessaires apt-get install libxml2-dev libxslt1-dev libsasl2-dev libldap2-dev \ libssl-dev libffi-dev libjpeg-dev libpq-dev

Passage de la version 15 CE à la version 15EE

Télécharger la version 15EE sur la page de téléchargement d'Odoo.

service odoo stop dpkg -i <path_to_enterprise_deb> python3 /usr/bin/odoo -d <database_name> -i web_enterprise --stop-after-init

Work in progress:

apt-get install libxml2-dev libxslt1-dev libsasl2-dev libldap2-dev libssl-dev libffi-dev libjpeg-dev libpq-dev
drop sequence base_cache_signaling_default;
drop sequence base_cache_signaling_assets;
drop sequence base_cache_signaling_templates;
drop sequence base_cache_signaling_routing;
python3 <(curl -s https://upgrade.odoo.com/upgrade) test -d klinicare -t 17.0 --contract M240802164735325
psql
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
DROP DATABASE template1;
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UTF8';
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
\c template1;
VACUUM FREEZE;
dropdb "klinicare_test_17.0_2024_09_17_17_51"
createdb -E utf8 klinicare_v17
psql klinicare_v17 < dump.sql​
ALTER DATABASE klinicare_v17 OWNER TO odoo;
cp /var/lib/odoo/.local/share/Odoo/filestore/klinicare /var/lib/odoo/.local/share/Odoo/filestore/klinicare_v17/ -r
vérifier les droits sur les dossiers du filestore
chown odoo:odoo * -R

désinstaller les modules non-officiels fermer le serveur faire un backup

su postgres -s /bin/bash service odoo stop dpkg -i python3 /usr/bin/odoo -d klinicare -i web_enterprise --stop-after-init

Lancer la commande de maj

apt install rsync su postgres -s /bin/bash cd /tmp # Changer test python3 <(curl -s https://upgrade.odoo.com/upgrade) test -d klinicare -t 16.0 --contract xxxxxx

/var/lib/odoo/.local/share/Odoo/filestore/klinicare/

klinicare_test_16.0_2024_09_02_18_10

When performing database restoration via the command line, ensure you have correctly placed the filestore. The database name and filestore name should match to ensure Odoo uses the same filestore rather than generating a new one. The filestore in Odoo is stored in /home/odoo/.local/share/Odoo/filestore (assuming /home/odoo is Odoo’s home directory).

ALTER DATABASE "klinicare_test_16.0_2024_09_02_18_10" OWNER TO odoo; SELECT format( 'ALTER TABLE public.%I OWNER TO odoo', table_name ) FROM information_schema.tables WHERE table_schema = 'public' AND table_type = 'BASE TABLE' \gexec SELECT format( 'ALTER TABLE public.%I OWNER TO odoo', table_name ) FROM information_schema.tables WHERE table_schema = 'public' AND table_type = 'BASE TABLE' \gexec drop sequence base_cache_signaling; drop sequence base_registry_signaling; drop sequence base_cache_signaling_default; drop sequence base_cache_signaling_assets; drop sequence base_cache_signaling_templates; drop sequence base_cache_signaling_routing;

Sources

https://www.odoo.com/documentation/15.0/fr/administration/on_premise/community_to_enterprise.html