Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged

I am trying to migrate the DB from Odoo 15 to Odoo 16. I used Openupgrade to migrate the DB and it is a success. Now I want to migrate custom data. I had used a 3rd party module in my Odoo 15 version, and i got its 16 version. But the issue is they changed the model name and added new models in the latest (Odoo 16) version. I am trying to migrate these data using `odoo.upgrade` library.


Here is what i did in the custom module (my_custom_module)


1. Created pre-migration script

2. Created post-migration script

3. Updated the module with the desired db and upgrade-path


`./odoo-bin --config=migration.conf --upgrade-path=Odoo_upgrade_util/upgrade-util/src -d my_odoo16db -u my_custom_module`


From my understanding, the migration script works like this, the first the pre-migration script will execute, then upgrade the module `my_custom_module` and last the post-migration script will work.


And here is the result.


1. Pre-migartion script executed

2. Upgraded the custom module, `my_custom_module`. ( In the log, i saw an xml file name which is imported as last in manifest file.)

3. Executing the pos-migration script. But here i am trying to insert some records into new model which should be created in the step 2, it is a new model, no existing in the Odo 15 db.)

4. But i am getting an error of the model `new_custom_model` is not exist in the odoo 16 db.


Here i am attaching the screenshot of the directory structure.



How can i solve this?



  [1]: https://i.stack.imgur.com/fPo3e.png

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jan. 24
1789
1
apr. 25
1392
Odoo App Solved
1
nov. 23
1974
0
maj 24
1693
0
sep. 23
2653