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,
- Created pre-migration script
- Created post-migration script
- 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.
- Pre-migartion script executed
- Upgraded the custom module,
my_custom_module. ( In the log, i saw an xml file name which is imported as last in manifest file.) - 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.)
- But i am getting an error of the model
new_custom_modelis not exist in the odoo 16 db.
Here i am attaching the screenshot of the directory structure.
How can i solve this?
