[FIX] base: keep the model cache consistent
Do not remove fields from models except for custom fields. Removing a base field from a model screws up the model cache: that field may be required to speed up the setup of the model in another registry.
This commit is contained in:
@@ -420,7 +420,8 @@ class ir_model_fields(osv.osv):
|
||||
if field.state == 'manual' and field.ttype == 'many2many':
|
||||
rel_name = field.relation_table or model._fields[field.name].relation
|
||||
tables_to_drop.add(rel_name)
|
||||
model._pop_field(cr, uid, field.name, context=context)
|
||||
if field.state == 'manual':
|
||||
model._pop_field(cr, uid, field.name, context=context)
|
||||
|
||||
if tables_to_drop:
|
||||
# drop the relation tables that are not used by other fields
|
||||
|
||||
Reference in New Issue
Block a user