Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1440 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 24
1798
1
เม.ย. 25
1395
Odoo App แก้ไขแล้ว
1
พ.ย. 23
1990
0
พ.ค. 24
1700
0
ก.ย. 23
2661