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

Hey,

I am willing to change the technical name of a module on an existing database. The operation happens in 2 steps : create a duplicate of my module with the new_named. Uninstall the old_named module.

Now, uninstalling the old_named module removes all associated fields. The new module recreates them, but of course, the tables are empty.

How could I proceed to change the technical name (module's folder name) without loosing data in the database ? (there is no change involved in the code itself) tks

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

Hello Nicolas,

You can follow this link.

Hope this helps

Thanks and Regards,

Kalpana Hemnani

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

Great post indeed, this will serve many ppl I think. Thanks you

ผู้เขียน

You could post this tutorial right here too.

คำตอบที่ดีที่สุด

You can remove the old module from the file system, without uninstalling it.

Restart openerp-server

Then, you can add and install the renamed module: existing data will not be lost.

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

Thanks for the tip, this solution works. Though, it doesn't allow me to fully remove a module. Nevertheless, the fields are now declred in a new module, and data was kept intact.

I didn't try, but maybe you can simply remove the old module from the ir_module_module table

ผู้เขียน

indeed, but there are many dependents on ir_module_module (ir_model_constraint, relation, dependency, etc) ... that I wouldn't interact with by hand.

Or manually set it as uninstalled?

ผู้เขียน

I'll try :

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.ค. 24
1745
1
ม.ค. 24
4779
2
มี.ค. 23
2579
3
มิ.ย. 20
10395
2
มี.ค. 20
8773