Přejít na obsah
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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
led 24
1791
1
dub 25
1393
Odoo App Vyřešeno
1
lis 23
1975
0
kvě 24
1696
0
zář 23
2655