This question has been flagged

Hello,

I am currently working on version 11 of odoo and I would like to upgrade to version 12. I am under a DOCKER environment in CE. I use python 3.5 and a postrgreSQL database with pgAdmin.
The data I need to transmit are those of the following modules:

- CRM
- SALE
- INVOICE (account)
- PARTNER

I'm trying to use OpenUpgrade for this purpose. Following the operations described here: https://www.odoo.com/fr_EN/forum/aide-1/question/how-to-do-odoo-database-migration-by-using-https-github-com-oca-openupgrade-122800 and adapting them to my environment, here is what I have done so far:

- Download OpenUpgrade (from branch 11) in the addons directory (shared folder mounted in volume to access it in the container)
- docker exec -ti -u0[id-container] bash (I connect online from console to docker container)
- in this path: /mnt/extra-addons/OpenUpgrade/scripts, I execute: "python3.5 migrate.py --config=/etc/odoo/odoo.conf --database=to_migrate --run-migrations=11.0"
--config=my conf odoo file on the container
--database=name of the database to migrate
--run-migrations=migrations to be performed (here 11 to 12)


I then have some mistakes that I can easily fix:
- No module named future --> pip3 install future
- No user found in configuration --> apt-get install nano --> add to the conf file :

db_host =[my host db]
db_port = 5432
db_user =[my user]
db_password =[my password]

- Could not clone version --> apt-get install git

​So far so good, I run the script again with the same command and get the following:

http://zupimages.net/viewer.php?id=19/24/2gik.png (sorry i can't insert image here but normally the link works)

No crash, so I'll see on pdadmin, a base has been created, miracle! After studying the database, it is exactly the same as my old database, the script only made a duplicate. Does anyone have any suggestions? Any indication of the error "Failed, fallback on creating empty database + loading a dump"? I went to see in the script it seems to be an error concerning psycopg2 ...​

​More i'm asking, in the doc of OCA ( https://doc.therp.nl/openupgrade/migrate.py.html ) i see that i should put "12.0" in place of "11.0" in --run-migrations. But this option does not exist (it is not taken into account by the migration script), does it mean that this is not possible to upgrade to version 12 ?

EDIT : the right option is 12.0

 it is no longer possible to use the script migrate.py of openupgrade to migrate odoo 11 to odoo 12 at this date, we have to do it with the manual steps 

Avatar
Discard

--run-migrations=12.0

Author

But this option does not exist so what i am doing wrong ? maybe it is not the right script ?

I have to take the one in OCA/OpenUpgrade Branch 11? (In branch 12 there are no scripts)

Author Best Answer

Thank you Zbnik for this link.
So I understand that today it is no longer possible to use the script migrate.py of openupgrade for an 11 to 12 migration.

If someone know how to use it without the script and can explain it I am very interested!

Avatar
Discard

Please reset the answer state. Your assumption is not correct: the script 'migration.py' is obsolete, but OpenUprade itself works and even is under active development (look at commit dates: https://github.com/OCA/OpenUpgrade/tree/12.0/addons)

Author

You're right, my wording was not correct. I modified my answer to specify that only the script is obsolete at that date.

However, without this script I don't know how to use OpenUpgrade, I have no doubt that this is possible but I can't find any clear explanation about it.