Uninstall of addons should not remove special fields (id, create_date, ...)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Medium
|
OpenERP's Framework R&D |
Bug Description
Steps to reproduce (warning! destroy the database!):
1) In a custom module, adds the following lines (these lines are in the base_partner_merge backport):
class res_partner(
_inherit = 'res.partner'
_columns = {
'id': fields.
}
2) Install the module
3) Uninstall the module
Result:
The columns 'id' and 'create_date' are dropped from the database.
Expected:
The columns 'id' and 'create_date' are still there.
Cause: the uninstall looks in ir_model_data and removes the columns no longer referenced by any record (a record in ir_model_data indicating that the column is still owned by another module). When we redeclare a special column, like "id", an ir_model_data entry is created for the custom module, example: base_partner_
Happens with https:/
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 21 lines (+3/-1)1 file modifiedopenerp/addons/base/ir/ir_model.py (+3/-1)
description: | updated |
Changed in openobject-server: | |
assignee: | nobody → OpenERP's Framework R&D (openerp-dev-framework) |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Did you understood that uninstalling a module may trash the database as it will remove res_partner.id?
Is this bug really a *wishlist* ?