-
-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration Step for Odoo v15 to v16 with docker #3846
Comments
Hi, thanks for your interest in Openupgrade project. When you want to upgrade from 15.0 to 16.0 you have to use odoo 16.0 + openupgrade 16.0. Once you use the correct version, you have to follow the instruction and set the openupgrade modules in the addons_path. |
While it make sens, I have no idea what is the implication of this statement. Do I need to start an additional container with odoo:16.0 I search for a docker image named "openupgrade" in dockerhub and did not found any. At least none of them looked official. What would be helpful is an example of how odoo it running then provide the steps with command line to upgrade ? e.g.: I'm running odoo with the following docker-compose:
|
yes.
There is no docker image named openupgrade. openupgrade is two modules that have to be present in your addons path.
that seems out of the topic of OpenUpgrade. Using openupgrade requires to know how to use odoo, use extra addons, merge various PR and make an update of the database. These are the prerequisites. Same here, I'll try to make the documentation more explicit on that topic. regards. |
I'm still trying to stick the puzzle together. How am I suppose to install "openupgradelib" within the Docker container ? I try adding it to the addons folder, but it doesn't seams to get pick-up by odoo. I get the following exception:
|
Hi Kind regards. |
Maybe we should clarify that OCA/OpenUpgrade doesn't support Docker deployment ? So far, I came up with the following procedure to initiate the upgrade. but even then, I feel alot of information is missing in the documentation. During the upgrade, I saw a couple of SQL exceptions:
And python is trowing many exception too:
Here the step I followed: Upgrade postgresql versionWhen upgrading Odoo, you may need to also upgrade your postresql database to the latest version. docker-compose exec {service_name} pg_dumpall -U {postgres_user} > dump.sql That will create a backup of your database as SQL file. You will need that file to restore your data into the newer postgresql. Create a new volume or folder for the new postgresql database and edit your compose file to make use of this new volume or folder. e.g.:
Should become
NOTICE: make sure to add Restart your docker compose.
Execute the following commands to restore your database into the new postgresql instance
Finnaly, restart your docker compose again, and Odoo should be running with the new database. Download OpenUpgrade to Odoo's Addons folder
Make sure the adjust the permissions of the folder when using Docker
Update Odoo version and change command line in docker composeBefore restarting Odoo, update your docker compose file to the targeted version. e.g.:
Should become
Restart odooWhen using docker-compose
If you are using plain docker command line:
Initiate upgradeInitiate the upgrade by browsing to odoo url.
The log should display multiple SQL statements to upgrade your existing database. |
I think I manage to narrow the issue the the following problem that occurred during the migration:
It seams to prevent the upgrade from going further. |
@legalsylvain
But next, I'm running into another issue:
Seams i'm missing the payment_icon for Sadad and Mada. Those should be created by |
hi, @ikus060, I don't get your point. If I understand correctly, you try to migrate a DB from 15.0 to 16.0 with 72 modules including |
@ikus060 You can check the ongoing PR to see if anyone has already done some progress on these modules. If so, a code review would be highly welcomed. |
@jcdrubay Having grasped the migration table, I comprehend that the migration from version 15 to 16 is still in its early stages. Considering the limited time available for me to carry out the Odoo migration, I cannot allocate all the necessary time to write the migration script. Moreover, I'm uncertain whether I possess the technical expertise required for scripting the migration process. Therefore, I will wait for some time until the migration is adequately covered. |
@ikus060 Hello, where do you find the steps to update the container? Im trying to do the same process as you (v15 to v16) running v15 on docker container but there is no mention of container in documentation.. so... how do you do the migration? |
Upgrade postgresql versionWhen upgrading Odoo, you may need to also upgrade your postresql database to the latest version.
That will create a backup of your database as SQL file. You will need that file to restore your data into the newer postgresql. Create a new volume or folder for the new postgresql database and edit your compose file to make use of this new volume or folder. e.g.:
Should become
NOTICE: make sure to add Restart your docker compose.
Execute the following commands to restore your database into the new postgresql instance
Finnaly, restart your docker compose again, and Odoo should be running with the new database. Download OpenUpgrade to Odoo's Addons folder
Make sure the adjust the permissions of the folder when using Docker
Update Odoo version and change command line in docker composeBefore restarting Odoo, update your docker compose file to the targeted version. e.g.:
Should become
That will have the efect to install openupgradelib dependencies within the image and to load openupgrade_framework addons as a server wide module. Restart odooWhen using docker-compose
If you are using plain docker command line:
Initiate upgradeInitiate the upgrade by browsing to odoo url.
The log should display multiple SQL statements to upgrade your existing database. Need to create column
db_1 | 2023-05-03 16:56:13.169 UTC [42] ERROR: could not create unique index "utm_source_unique_name" |
@ikus060 THanks for your reply, i just needed to modify something on your steps: i needed to delete this two sequences on the database: base_cache_signaling And then change the command: the command should be this: Now, im stuck on the payment module too, i see that there is a PR for it: #3918 but its not approved, |
I am so happy that I found this post for upgrading my docker instances. $ apt update |
and yes, obviously the upgrade failed because the module could not be loaded when I start docker shell I am connected as user "odoo" |
I'm still in progress to migrate my Odoo instance. I'm waiting for a couple of module to get updated. But here the files I used to upgrade. upgrade.sh is the script launched to automate the upgrade. Read comments to understand each step. |
In the meantime I found a workaround for my root issue. Have to mention that I am on a Synology NAS with Container Manager module, so I dont wanted to do much on the Linux command line. |
Hi @ikus060, how did you solve the problem about payment aps? |
Hi there!
I'm trying to upgrade my Odoo instance from version 15 to version 16 using the Odoo OpenUpgrade tool. However, when running Odoo in a container with the Docker image "odoo:15.0", I can't seem to find the migration step for this version upgrade.
I've looked through the documentation and searched online, but haven't been able to find any information on this specific issue. Can someone please help me figure out how to access the migration step for upgrading from Odoo v15 to v16 when running Odoo in a container with the "odoo:15.0" Docker image?
The text was updated successfully, but these errors were encountered: