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

Hi,

I work on version 10 of odoo.

I'm trying to move the code in some old modules to new ones, in order to finally uninstall the old modules, so I proceded like this:

1 - move the code to my new modules.

2- delete the XML content in the original module so that I have only python code duplicated.

3- install my new modules.

4- uninstall original module.

the issue here is that the fields defined in the original module are removed from the database even though I redefined them in my new modules, resulting in a data loss,

is there any solution to refactor the code and change modules structure without losing data?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

On uninstalling a module, Odoo removes corresponding fields from the database. This is the normal behaviour. The idea would be to upgrade your module, after adding all the necessary modifications, instead of uninstalling and the reinstalling the module.

อวตาร
ละทิ้ง
ผู้เขียน

What I'm trying to do is to finally uninstall the original module and replace it with new modules (2 or 3) without losing my data, these new modules contain the logic existing in the original module plus many customizations that I did.

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ย. 18
2368
2
พ.ย. 18
8140
1
ก.ย. 17
3547
3
มี.ค. 15
13872
Getting data from user form แก้ไขแล้ว
3
ก.ย. 23
4169